Jump to content

Crazyd

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by Crazyd

  1. I know old topic but I thought I'd add my own sample. Same as above but using a function and Tool Tips. Not sure if it'll show up 100% but what the hell. I did need this information and hope I can help others HotKeySet("{PAUSE}", "TogglePause") fncPauseTime (2, " =================== " & @LF & _ "--- Web page Reload Failed --- " _ & @LF & " --- Forced Pause till next try --- "_ & @LF & " ************************* ", 3) Func fncPauseTime($TimeToPause, $Message, $Warning) Dim $PauseLeft = 1, $Time, $TTLSec, $Sec, $Min $Time = TimerInit() $Paused = Not $Paused While $PauseLeft > 0 And $Paused Sleep(500) $PauseLeft = TimerDiff($Time) $PauseLeft = ($TimeToPause * 60 * 1000) - $PauseLeft $TTLSec = Round($PauseLeft / 1000) $Min = Floor($TTLSec / 60) $Sec = Mod($TTLSec, 60) If $Sec < 10 Then $Sec = "0" & $Sec ToolTip($Message & @LF & " Waiting - " & $Min & ":" & $Sec & " minutes" & @LF & _ "Press {Pause} - to continute.", 400, 30, _ " Paused for " & $TimeToPause & " Minutes", $Warning) WEnd If $Paused Then $Paused = Not $Paused ToolTip("") EndFunc ;==>fncPauseTime Func TogglePause() $Paused = Not $Paused While $Paused ToolTip("************************************" & @CRLF & _ "* Program is Paused *" & @CRLF & _ "************************************" & @CRLF _ , 400, 30, " Paused - Press {Pasue} again" , 2, 0) Sleep(400) WEnd ToolTip("") EndFunc ;==>TogglePause
  2. I know how to read a GUI box, but I'd like to put new data in the TextBox after I click a button to find Cursor and Color. There has to be a way... I just can't find any way but to delete the TextBox and re-create it with the value I want. What am I missing... /sigh
  3. If you just want the data you could export it as a CSV file and load it into an array, but besides that I have no clue. Access I haven't touched yet with AutoIT.
  4. So I've been working on reading and writing an array to file. Seemingly I've got it working but I was wondering if there was a better way. So here is the only way I've figured out how to do it. Please let me know if there is a better way. Dim $MainArray[45][51] Dim $RecordCount, $MaxRec = 45, $MaxPerArray = 50 ArrayLoad() ArrayWrite() Func ArrayLoad() ; Load the array from File Local $ReadArray, $SplitRead, $sFile = @ScriptDir & "\RefUSA.inf", $Message, $Read $Read = _FileReadToArray($sFile, $ReadArray) $RecordCount = 0 if $Read = 1 Then if $ReadArray[0] > $MaxRec Then $ReadArray[0] = $MaxRec ;Limits File Read to $MaxRec Records For $x = 1 to $ReadArray[0] $SplitRead = StringSplit($ReadArray[$x], @tab, 1) if $SplitRead[0] > $MaxPerArray Then $SplitRead[0] = $MaxPerArray ;Limits File Read to $MaxPerArray Records For $Y = 1 to $SplitRead[0] $MainArray[$X-1][$Y-1] = $SplitRead[$Y] Next $RecordCount = $x Next Else MsgBox( 0, "Error Missing File", "Mouse Location and Color File missing or Corrupt") ManualLoad() EndIf _ArrayDisplay($MainArray, "$MainArray AFTER _FileReadToArray()") EndFunc Func ArrayWrite() Local $GFX[$MaxPerArray], $ArrayLine[1], $SplitRead, $sFile = @ScriptDir & "\RefUSA.inf", $Test for $Y = 0 to $RecordCount-1 For $X = 0 to $MaxPerArray-1 $GFX[$X] = $MainArray[$Y][$X] Next If $Y = 0 Then $ArrayLine[0] = _ArrayToString($GFX, @TAB) Else _ArrayAdd($ArrayLine,_ArrayToString($GFX, @TAB)) EndIf Next _FileWriteFromArray( $sFile, $ArrayLine) _ArrayDisplay($ArrayLine, "$ArrayLine AFTER _FileWriteFromArray", $RecordCount-1) EndFunc Func ManualLoad() Global $MainArray[4][51] = [["1280x1024_Server_Com",215, 420, "000000", "FFFFFF", 228, 427, 265, 673, 325, 380, 689, 280, 18, 43, _ 955, 360, 905, 395, "FFFFFF", 943, 356, "F5F2F1", 905, 315, 905, 395, "F5F2F1", 888, 315, "F5F2F1", _ 975, 351, 750, 400, "FFFFFF", 975, 351, "F5F2F1", 870, 282, 750, 400, "FFFFFF", 820, 283, "F5F2F1", _ 927, 353, "3FAA37"], _ ["1366x768_Server_Com",256, 420, "000000", "FFFFFF", 228, 427, 262, 673, 325, 380, 689, 280, 22, 45, _ 955, 360, 905, 395, "FFFFFF", 943, 356, "F5F2F1", 905, 315, 905, 395, "F5F2F1", 888, 315, "F5F2F1", _ 975, 351, 750, 400, "FFFFFF", 975, 351, "F5F2F1", 870, 282, 750, 400, "FFFFFF", 820, 283, "F5F2F1", _ 975, 351, "3FAA37"], _ ["1366x768_Server_Resi",257, 428, "000000", "FFFFFF", 263, 453, 263, 696, 374, 358, 689, 280, 22, 45, _ 990, 342, 900, 411, "FFFFFF", 990, 342, "F5F2F1", 924,318, 900, 411, "F5F2F1", 924, 318, "F5F2F1", _ 975, 351, 750, 400, "FFFFFF", 975, 351, "F5F2F1",870, 282, 750, 400, "FFFFFF", 820, 283, "F5F2F1", _ 975, 351, "3FAA37"], _ ["1280x1024_Win7_Com",216, 427, "F8F9FA", "F5F5F5", 226, 432, 265, 673, 325, 380, 689, 280, 18, 43, _ 955, 360, 905, 395, "FFFFFF", 943, 356, "F5F2F1", 905, 315, 905, 395, "F5F2F1", 888, 315, "F5F2F1", _ 927, 353, 750, 400, "FFFFFF", 975, 351, "F5F2F1", 870, 282, 750, 400, "FFFFFF", 820, 283, "F5F2F1", _ 927, 353, "3FAA37"]] $RecordCount = 4 EndFunc
×
×
  • Create New...