Sign in to follow this  
Followers 0
gcue

line limitation to filewrite?

4 posts in this topic

i think theres a line limitation to how many lines you can write to a file?

as soon as i delete one of the lines i dont get an error when compiling

syntax looks ok

$changelog = (@ScriptDir & "\changes.log")

    If FileExists($changelog) Then
        FileDelete($changelog)
    EndIf

    FileWrite($changelog, @ScriptName & @CRLF & _
            'Change Log' & @CRLF & _
            '' & @CRLF & _
            'Changes from v0.1 beta 5g to v0.1 beta 5h' & @CRLF & _
            '1. If a default location is deleted, setting for default location is also removed.' & @CRLF & _
            '2. Check for Updates in the help menu.' & @CRLF & _
            '' & @CRLF & _
            'Changes from v0.1 beta 5f to v0.1 beta 5g' & @CRLF & _
            '1. Added the ability to remove a PC by right clicking it.' & @CRLF & _
            '2. Changed the label display for each PC icon.' & @CRLF & _
            '3. When changes are made to INI, drop does not change to "All Locations" - only if a location is deleted.' & @CRLF & _
            '4. When Adding PCs from a subnet, dropdown changes to location added.' & @CRLF & _
            '5. Requirements check for Bloomberg Updater are performed earlier for Single PC upgrades.' & @CRLF & _
            '' & @CRLF & _
            'Changes from v0.1 beta 5e to v0.1 beta 5f' & @CRLF & _
            '1. Changed the timing logic in the Restart PC/Location functions.' & @CRLF & _
            '' & @CRLF & _
            'Changes from v0.1 beta 5d to v0.1 beta 5e' & @CRLF & _
            '1. After a PC is added and the INI is refreshed, the location does not change to "All Locations" in the dropdown.' & @CRLF & _
            '2. Added a function to check who has local administrative rights on a machine or location.' & @CRLF & _
            '3. Added ability to set a default location.' & @CRLF & _
            '' & @CRLF & _
            'Changes from v0.1 beta 5c to v0.1 beta 5d' & @CRLF & _
            '1. Prevented PSEXEC agreement prompt from coming up at first run.' & @CRLF & _
            '2. Added credits to About section.' & @CRLF & _
            '' & @CRLF & _
            'Changes from v0.1 beta 5b to v0.1 beta 5c' & @CRLF & _
            '1. Since IPs to Trade Riseboards are no longer hardcoded into the script' & @CRLF & _
            'but rather are now being pulled from the INI, the function has become available to everyone.' & @CRLF & _
            '2. Took Change Log and About out of a dialog boxes - text bodies was getting too large and difficult to read.' & @CRLF & _
            '' & @CRLF & _
            'Changes from v0.1 beta 5a to v0.1 beta 5b' & @CRLF & _
            '1. Improved Location Uptime Check: was not working properly' & @CRLF & _
            'if "Primary User" was not defined in PC registry (noticed with DR PCs).' & @CRLF & _
            '2. Labeled PC icon context menu with PC Label to avoid confusion as to which PC was right clicked.' & @CRLF & _
            '' & @CRLF & _
            'Changes from v0.1 beta 5 to v0.1 beta 5a' & @CRLF & _
            '1. IPs on icon labels were 1 digit off - fixed.' & @CRLF & _
            '2. Further improved Remote Screenshot logic.' & @CRLF & _
            '' & @CRLF & _
            'Changes from v0.1 beta 4 to v0.1 beta 5' & @CRLF & _
            '1. Added a check for Non-Iprint Printers installed on remote PC.' & @CRLF & _
            '2. Added VNC ability which reads section "VNC_TARGETS" from INI file (Trade Support only).' & @CRLF & _
            '3. Extended restart times and changed them to minutes instead of seconds.' & @CRLF & _
            '4. Added ability to restart a location (BC Team only).' & @CRLF & _
            '5. Fixed ETP Startup.' & @CRLF & _
            '6. Improved logic in Remote Screenshot.' & @CRLF & _
            '7. Changed "Please Wait" window size for viewability in Windows XP Theme.' & @CRLF & _
            '' & @CRLF & _
            'Changes from v0.1 beta 3 to v0.1 beta 4' & @CRLF & _
            '1. Added Netsupport Buddy (which disables Ultramon on remote PC)' & @CRLF & _
            'to Utilities Menu (for quick access to machines that are not Dashboard asset list).' & @CRLF & _
            '2. Startup indicates which applications cannot be deleted from startup' & @CRLF & _
            '(applications are greyed out).' & @CRLF & _
            '3. Added Sametime 3.1/7.5 as Startup options.' & @CRLF & _
            '4. Greyed out some buttons that are not accessible while functions are running.' & @CRLF & _
            '' & @CRLF & _
            'Changes from v0.1 beta 2 to v0.1 beta 3' & @CRLF & _
            '1. Added "please wait" msgbox at startup while program writes log.' & @CRLF & _
            '2. Window "file" menu options are now available in window context "file" menu.' & @CRLF & _
            '3. Organized window context menu.' & @CRLF & _
            '4. Updated About section with known issues and current tasks.' & @CRLF & _
            '5. Added asset column to Location Uptime Check.' & @CRLF & _
            '' & @CRLF & _
            'Changes from v0.1z to v0.1 beta 1' & @CRLF & _
            '1. Indicates if Utimaco is not installed on remote machine.' & @CRLF & _
            '2. Can perform other tasks in Dashboard while Netsupporting.' & @CRLF & _
            '' & @CRLF & _
            'Please contact GXM x90760 for suggestions or bug reports.')
    
    ShellExecute($changelog)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

There is a line character limitation for strings. 4095/4096 characters I believe.

Edited by SmOke_N
typo

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

gotcha,

thanks!

Share this post


Link to post
Share on other sites

gotcha,

thanks!

See if this helps:
Local $s_line = @ScriptName & @CRLF
    $s_line &= 'Change Log' & @CRLF
    $s_line &= '' & @CRLF
    $s_line &= 'Changes from v0.1 beta 5g to v0.1 beta 5h' & @CRLF
    $s_line &= '1. If a default location is deleted, setting for default location is also removed.' & @CRLF
    $s_line &= '2. Check for Updates in the help menu.' & @CRLF
    $s_line &= '' & @CRLF
    $s_line &= 'Changes from v0.1 beta 5f to v0.1 beta 5g' & @CRLF
    $s_line &= '1. Added the ability to remove a PC by right clicking it.' & @CRLF
    $s_line &= '2. Changed the label display for each PC icon.' & @CRLF
    $s_line &= '3. When changes are made to INI, drop does not change to "All Locations" - only if a location is deleted.' & @CRLF
    $s_line &= '4. When Adding PCs from a subnet, dropdown changes to location added.' & @CRLF
    $s_line &= '5. Requirements check for Bloomberg Updater are performed earlier for Single PC upgrades.' & @CRLF
    $s_line &= '' & @CRLF
    $s_line &= 'Changes from v0.1 beta 5e to v0.1 beta 5f' & @CRLF
    $s_line &= '1. Changed the timing logic in the Restart PC/Location functions.' & @CRLF
    $s_line &= '' & @CRLF
    $s_line &= 'Changes from v0.1 beta 5d to v0.1 beta 5e' & @CRLF
    $s_line &= '1. After a PC is added and the INI is refreshed, the location does not change to "All Locations" in the dropdown.' & @CRLF
    $s_line &= '2. Added a function to check who has local administrative rights on a machine or location.' & @CRLF
    $s_line &= '3. Added ability to set a default location.' & @CRLF
    $s_line &= '' & @CRLF
    $s_line &= 'Changes from v0.1 beta 5c to v0.1 beta 5d' & @CRLF
    $s_line &= '1. Prevented PSEXEC agreement prompt from coming up at first run.' & @CRLF
    $s_line &= '2. Added credits to About section.' & @CRLF
    $s_line &= '' & @CRLF
    $s_line &= 'Changes from v0.1 beta 5b to v0.1 beta 5c' & @CRLF
    $s_line &= '1. Since IPs to Trade Riseboards are no longer hardcoded into the script' & @CRLF
    $s_line &= 'but rather are now being pulled from the INI, the function has become available to everyone.' & @CRLF
    $s_line &= '2. Took Change Log and About out of a dialog boxes - text bodies was getting too large and difficult to read.' & @CRLF
    $s_line &= '' & @CRLF
    $s_line &= 'Changes from v0.1 beta 5a to v0.1 beta 5b' & @CRLF
    $s_line &= '1. Improved Location Uptime Check: was not working properly' & @CRLF
    $s_line &= 'if "Primary User" was not defined in PC registry (noticed with DR PCs).' & @CRLF
    $s_line &= '2. Labeled PC icon context menu with PC Label to avoid confusion as to which PC was right clicked.' & @CRLF
    $s_line &= '' & @CRLF
    $s_line &= 'Changes from v0.1 beta 5 to v0.1 beta 5a' & @CRLF
    $s_line &= '1. IPs on icon labels were 1 digit off - fixed.' & @CRLF
    $s_line &= '2. Further improved Remote Screenshot logic.' & @CRLF
    $s_line &= '' & @CRLF
    $s_line &= 'Changes from v0.1 beta 4 to v0.1 beta 5' & @CRLF
    $s_line &= '1. Added a check for Non-Iprint Printers installed on remote PC.' & @CRLF
    $s_line &= '2. Added VNC ability which reads section "VNC_TARGETS" from INI file (Trade Support only).' & @CRLF
    $s_line &= '3. Extended restart times and changed them to minutes instead of seconds.' & @CRLF
    $s_line &= '4. Added ability to restart a location (BC Team only).' & @CRLF
    $s_line &= '5. Fixed ETP Startup.' & @CRLF
    $s_line &= '6. Improved logic in Remote Screenshot.' & @CRLF
    $s_line &= '7. Changed "Please Wait" window size for viewability in Windows XP Theme.' & @CRLF
    $s_line &= '' & @CRLF
    $s_line &= 'Changes from v0.1 beta 3 to v0.1 beta 4' & @CRLF
    $s_line &= '1. Added Netsupport Buddy (which disables Ultramon on remote PC)' & @CRLF
    $s_line &= 'to Utilities Menu (for quick access to machines that are not Dashboard asset list).' & @CRLF
    $s_line &= '2. Startup indicates which applications cannot be deleted from startup' & @CRLF
    $s_line &= '(applications are greyed out).' & @CRLF
    $s_line &= '3. Added Sametime 3.1/7.5 as Startup options.' & @CRLF
    $s_line &= '4. Greyed out some buttons that are not accessible while functions are running.' & @CRLF
    $s_line &= '' & @CRLF
    $s_line &= 'Changes from v0.1 beta 2 to v0.1 beta 3' & @CRLF
    $s_line &= '1. Added "please wait" msgbox at startup while program writes log.' & @CRLF
    $s_line &= '2. Window "file" menu options are now available in window context "file" menu.' & @CRLF
    $s_line &= '3. Organized window context menu.' & @CRLF
    $s_line &= '4. Updated About section with known issues and current tasks.' & @CRLF
    $s_line &= '5. Added asset column to Location Uptime Check.' & @CRLF
    $s_line &= '' & @CRLF
    $s_line &= 'Changes from v0.1z to v0.1 beta 1' & @CRLF
    $s_line &= '1. Indicates if Utimaco is not installed on remote machine.' & @CRLF
    $s_line &= '2. Can perform other tasks in Dashboard while Netsupporting.' & @CRLF
    $s_line &= '' & @CRLF
    $s_line &= 'Please contact GXM x90760 for suggestions or bug reports.'
    
    $changelog = (@ScriptDir & "\changes.log")

    If FileExists($changelog) Then
        FileDelete($changelog)
    EndIf

    FileWrite($changelog, $s_line)
    ShellExecute($changelog)

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0