Jump to content

MouseSpotter

Active Members
  • Posts

    131
  • Joined

  • Last visited

Everything posted by MouseSpotter

  1. AutoIt can do that ... search for Excel in the AutoIt help files.
  2. Not so fast Oh mighty Divine. All I did was wrap a function around Lentil's code - which works fine and checks the @error code (a better option than checking for an array IMHO). BTW The Call statement is not required - I only use it for calling functions when I do not know if the function exists or not. While True DoSearch() WEnd Func DoSearch() Local $coord = PixelSearch(0, 0, 20, 300, 0x32CD32, 10) If Not @error Then MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1]) EndIf EndFunc
  3. Something like: While true DoSearch() wend Func DoSearch() local $coord = PixelSearch( 0, 0, 20, 300, 0x32CD32, 10 ) If Not @error Then MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1]) EndIf EndFunc
  4. Yes ... because you would make your own password dialog using GUICREATE and detect extra IE windows in the While event loop.
  5. you are setting $var once ... at the beginning of the script You need to set $var to the clipboard content after each copy: $var = ClipGet() FileWriteLine($OutputFile,$i & "- " & $var)
  6. The ClipGet help states "Returns a string containing the text on the clipboard." Good ole Microsoft implies there only can be one clipboard object which will contain the data is as many formats as possible : http://msdn.microsoft.com/en-us/library/windows/desktop/ms649014(v=vs.85).aspx Which probably means your copy command will overwrite any existing content. However, as you haven't shared your code - it is hard to tell if you need to clear the clipboard because of another reason.
  7. Put a "Whle ... Wend" loop into your script until your file exists. Put a "Sleep" into your "While" loop if you want less CPU used.
  8. Do you have a working example to share?
  9. I think you are almost there with this ... Maybe this could help: Hide the IE window Show the password dialog Unhide the IE window on success Kill the IE process if password fails a certain number of times
  10. the help file has plenty of cursor options if that is what you are after
  11. Have a look at the "If" help. you cannot put an else all by itself. The pattern is If <expression> Then statements ... [ElseIf expression-n Then [elseif statements ... ]] ... [Else [else statements] ... EndIf
  12. Nice looking program. Your program does call the Exit command - however, I suspect that the following callbacks are keeping the program alive Global $wProcHandle = DllCallbackRegister("_WindowProc", "int", "hwnd;uint;wparam;lparam") Global $wProcHandle2 = DllCallbackRegister("_EditWindowProc", "ptr", "hwnd;uint;wparam;lparam") Global $wProcOld = _WinAPI_SetWindowLong($treeview, $GWL_WNDPROC, DllCallbackGetPtr($wProcHandle)) Global $wProcOldLocal2 = _WinAPI_SetWindowLong(GUICtrlGetHandle($find_input), $GWL_WNDPROC, DllCallbackGetPtr($wProcHandle2)) The Exit button exits the program when I remove these.
  13. Unfortunately the rule is: "Launching, automation or script interaction with games or game servers, regardless of the game". I am sure the Moderator will come along and clarify the position.
  14. There is a <IE.au3> set of functions for webpages
  15. I am adding a large list of data to a combobox dropdown (mainly because I want the list be visible beyond the thin GUI height). The list is then filtered, based on what the user enters in the edit box (a reducing list). Rebuilding the dropdown list is causes the list to 'flicker' because it is cleared then re-shown. _GUICtrlComboBox_BeginUpdate has reduced the flicker a bit - however, I am looking for a way to reduce this further. Any ideas? I have looked into the _GUICtrlComboBox & _GUICtrlComboBoxEx options and these are slower than the GUICtrlSetData options: #include <GUIConstantsEx.au3> #include <GuiComboBox.au3> #include <GuiComboBoxEx.au3> Local $hGui = GUICreate("") local $t local $text = "" local $y = 0 $t=TimerInit() local $hCombo_Add = _GUICtrlComboBox_Create($hGui,"",0,$y) $y += 40 for $i=1 to 4500 _GUICtrlComboBox_AddString($hCombo_Add,$i) next ConsoleWrite("_GUICtrlComboBox_AddString:" & TimerDiff($t)&@crlf) $t=TimerInit() $text = "" for $i=1 to 4500 $text &= $i & "|" next local $hCombo_Create = _GUICtrlComboBox_Create($hGui,$text,0,$y) $y += 40 ConsoleWrite("_GUICtrlComboBox_Create:" & TimerDiff($t)&@crlf) $t=TimerInit() local $hComboEx_Add = _GUICtrlComboBoxEx_Create($hGui,"",0,$y) $y += 40 for $i=1 to 4500 _GUICtrlComboBoxEx_AddString($hComboEx_Add,$i) next ConsoleWrite("_GUICtrlComboBoxEx_AddString:" & TimerDiff($t)&@crlf) $t=TimerInit() $text = "" for $i=1 to 4500 $text &= $i & "|" next local $hComboEx_Create = _GUICtrlComboBoxEx_Create($hGui,$text,0,$y) $y += 40 ConsoleWrite("_GUICtrlComboBoxEx_Create:" & TimerDiff($t)&@crlf) $t=TimerInit() $text = "" for $i=1 to 4500 $text &= $i & "|" next GUICtrlCreateCombo("",0,$y) $y += 40 GUICtrlSetData(-1,$text) ConsoleWrite("GUICtrlSetData:"&TimerDiff($t)&@crlf) GUISetState() While 1 If GUIGetMsg() = $GUI_EVENT_CLOSE Then ExitLoop WEnd GUIDelete()
  16. A cheats guide: have someone hover a large hammer over the hand that is not holding the mouse down. If the score does not improve ... the hammer drops. Result: “goal neglect” and “attentional lapses" decrease and reaction time decreases.. Side-effects may vary.
  17. This article may help: http://scienceblogs.com/developingintelligence/2007/10/29/speed-matters-but-not-how-you/
  18. Is the website you accessing an asynchronous one? (A clue to asynchronous might be that the URL does not change when the page content does) If so then JohnOne's suggestion is likely the only way you will know a page has loaded.
  19. Google: autoit click link
  20. Google: Autoit Control Events http://www.autoitscript.com/autoit3/docs/guiref/GUIRef_OnEventMode.htm
  21. Hmmm - full screen app? Reminds me of a Terra Online request recently made.
  22. Thanks for all your solutions The ones that match what I need are: Plus this to deal with user entering metacharacters
  23. Is there a StringRegExp pattern where you can match strings from within a delimited string (e.g. | delimited) that contain a substring being searched for. #include <array.au3> $text="|aaa|kcde|fff|akcde|aak|rpf|k|lir|" local $allPipedContent = StringRegExp($text,"\|?(.*?)\|",3) _ArrayDisplay($allPipedContent) local $allPipedContentThatContainsK = StringRegExp($text,no idea :(,3) _ArrayDisplay($allPipedContentThatContainsK) #cs result needs to be kcde akcde aak k #ce Additionally as the substring is not always k ... it can be any string ... is there an easy way to convert characters that StringRegExp interprets as control characters into literals that can be searched for (e.g. the "(" in the example below). |aaa|kcde|fff|(akcde|aak|rpf|k|lir|
  24. The copy&paste missed the end bracket in the last line "GUIDelete(" ... which I have now fixed. The code copies & pastes from the webpage fine for me. I used the AutoIt code type from the forum editor "code" icon.
×
×
  • Create New...