i have seen many pointing out issues related to this, i tried reading through them - still unable to solve mine.. i have a script which reads certain lines based on a search item, this is an iterative process - the ldflst_file gets updated for each iteration and the script finds the line number which has the search item. this works perfectly for few iterations, but stops in some cases abruptly with the error =
Subscript used on non-accessible variable $aRead^ ERROR I have verified that the search item is present in the file. what could be the reason for this code to stop in certain cases. thanks for help
my code below (partial).. full code is in attachment
global $ldflst_var1=" JOINT LOAD FORCE(X) FORCE(Y) FORCE(Z) MOMENT(X) MOMENT(Y) MOMENT(Z)"
for $i= 0 to $ldflst_totlines ; ldflst_totlines is total number of lines in the file 'ldflst_file'
if $aRead[$i]=$ldflst_var1 Then
I find it very weird:
if I run like this:
Local $aCoord = PixelSearch($posX, $posY, $sizeX, $sizeY, '0xFF455E')
If I run like this:
Local $metaColor1 = '0xFF455E' or like this Local $metaColor1 = "0xFF455E" or Local $metaColor1 = "'0xFF455E'"
Local $aCoord = PixelSearch($posX, $posY, $sizeX, $sizeY, $color)
it doesn't want to work! So something with variable is not working and yes if I print it out like this:
ConsoleWrite(@LF & $posX & ":"& $posY & ":"& $sizeX & ":" & $sizeY & ":" & $color&@LF)
So I dont see the problem, maybe some of you people?
By Kevin Finnegan
Long time lurker and now forum poster! I'm writing a relatively simple backup script for my firm that automates the copy, compression and organization of Leaver's data on one of our secured NAS systems. I personally found the best method to do this so far was to use 7zG.exe (GUI version of 7Zip which can use command-line too) and it functions quite well!
I would like to retrieve more info on whether any warnings or errors happen in 7Zip during the backup, but I can't quite get my head around the syntax and switches for reading out, it seems any adjustment I make to the RunWait call's string seems to break the backup or give unexpected repercussions! Hopefully its something silly I'm doing as I don't code very often.
Here is the working version:
; Compress the directories one by one in the zip using the listfile.... Local $iPID = RunWait(@ScriptDir & "\bin\7zG.exe a -mx" & $compressionQuality & " -v" & $compressSplitFileSize & " -wc:\temp " _ & $backupToLocation & "\" & $userDirectory & ".7z @bin\listfile.txt -x@bin\excludefile.txt", "", @SW_SHOWDEFAULT, $STDOUT_CHILD) Ultimately I would love to switch entirely to 7za.exe (standalone) so that I can read the progress percentage, current file being uploaded and any warnings or errors could be processed and output to the AutoIT script's GUI I've created rather than jumping in and out of two applications per se.
I need help about pixel search. The problem with the script below is that PixelSearch does not continue on the coordinates where it has stopped.
When the first pixelsearch finds the 1st pixel, it should move the mouse over it and new pixels would appear just like hovering over menus. Then upon hover, there would be another PixelSearch to see if the second red pixel is found. If not found, then it should resume the first PixelSearch instead of starting from left to right again.
For example we are doing a pixelsearch on two straight lines with coordinates [x,y] :
[0,0] [1,0] [2,0]
[1,0] [1,1] [1,2]
Pixelsearch finds the coordinate [1,0] matching our color. So it checks the pixel just below it which is [1,1] to see if it is color red. If not red then it should continue searching starting on coordinates [2,0] instead of going back to [0,0]
Local $bflag = False Do ToolTip("finding..",0,0,"") Sleep(500) $var = PixelSearch(591, 169, 1365, 740, 0x464950,50) ; look for initial pixel If Not @error Then ; MouseMove($var,$var,0) ;move on the button to show new selections, new pixels sleep(1000) ;search for the red pixel on an area above the first pixel coords which was ;generated when mouse cursor was hovered on the first pixel found. $redpixel = PixelSearch($var-50,$var-50,$var+50,$var+50,0xFF0048) If Not @error Then ; Found the 2nd pixel ToolTip("found...",0,0,"") $bflag = True EndIf EndIf Until $bflag I can pay 50USD through Paypal for a working solution. thanks
Hello, i'm trying to rename a variable to another variable name (not the value attached to the variable). This would save me TONS of coding.
Here is an example:
Local $clear1="$SATJ" ;sets the $clear1 variable to become $SATJ
GUICtrlSetState($clear1 & "3", $GUI_UNCHECKED) ;i want this to come out to be $SATJ3, it should look something like - GUICtrlSetState($SATJ3, $GUI_UNCHECKED)
I've already tried
any help is greatly appreciated!!!