עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

שאלה ב-VB סקריפט.

Featured Replies

פורסם

אהלן,

אני צריך לכתוב ב-VB סקריפט, אפשר להגדיר את זה כ-PRE PROCESS, שאני מקבל קובץ כלשהו, אחרי 79 שורות אני צריך לכתוב לשם ASCII CODE של שבירת עמוד (יש לי את ה-ASCII CODE). האם למישהו יש המלצה מאיפה להתחיל?

פורסם

העבודה עם קבצים בVBSCRIPT די מסורבלת בגלל שיש רק שלושה מצבי עבודה, או קריאה בלבד, או כתיבה שאז כל הקובץ נמחק ונוצר מחדש, או append המאפשר כתיבה לסוף הקובץ.

לכן מה שאני בד"כ עושה הוא קורא את כל הקובץ לתוך משתנה, חותך אותו למערך ע"י split, משנה את השורה שאני רוצה, ומחבר חזרה ע"י join.

Const ForWriting = 2, ForReading = 1, FormatUnicoe = -1, FormatASCII = 0

'path for your file
strFilePath = "C:\Documents and Settings\Administrator\Desktop\example.txt"

'ascii code
intASCIICode = 12

'create file system object and open text file for reading.
Set objFileSystem = CreateObject("Scripting.FileSystemObject")
Set objTextStream = objFileSystem.OpenTextFile(strFilePath, ForReading, false, FormatASCII)

'read content and close stream
strContent = objTextStream.ReadAll
objTextStream.close

'split content to array, each array element will hold 1 line
arrContent = Split(strContent, Chr(13) & Chr(10))
'edit the begining of line 80
arrContent(79) = Chr(intASCIICode) & arrContent(79)
'join array again
strContent = Join(arrContent, Chr(13) & Chr(10))

'open file for writing and write the content and close stream
Set objTextStream = objFileSystem.OpenTextFile(strFilePath, ForWriting, false, FormatASCII)
objTextStream.Write(strContent)
objTextStream.close

זהו פחות או יותר..

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.