Jump to content

herewasplato

Active Members
  • Posts

    4,211
  • Joined

  • Last visited

Profile Information

  • Member Title
    Most Senile Poster

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

herewasplato's Achievements

Universalist

Universalist (7/7)

3

Reputation

  1. Opt("WinTitleMatchMode", 2) ; 2 = Match any substring in the title WinActivate("Timer")works for me using v3.3.6.1 and the zip that you uploaded on XP Pro SP3 The window changes titles. When it is minimized to the task bar - the title is "Timer". When it is not minimized, perhaps not in the foreground, the title is "1 - QuickBooks Pro Timer".
  2. I'm not sure, but I've had some windows that AutoIt could never find the title. Last resort might be the Pixel functions. Once you know that it is there, then you might have to click on it via AutoIt and do the steps you mentioned here: When the script stucked, I move my mouse and close manually "Dialog 2", and select the combobox to make it open "Dialog 2" again. This time, WinWaitActive find its target and the script just passed.
  3. Yes. Try adding WinWait: WinWaitActive("Dialog 1") ControlCommand("Dialog 1","",225,"SelectString","string") WinWait("Dialog 2") WinActivate("Dialog 2") WinWaitActive("Dialog 2") $st = ControlSetText("Dialog 2", "", 7000, "11" ) MsgBox(1,"test",$st) If that does not work for you, add timeouts and check the return from each Win... line.
  4. I don't think that @comspec is needed. @OP, try Run("RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351")but I'm not sure if it will clear everything while the broswer is open. Maybe it will do what you want. It works for IE8 as well :-)
  5. There are several ways to accomplish this. Please post the code that you have so far. This will help us to know the direction that you were taking and maybe we can continue in that same direction.
  6. To use ProcessWait, you need the exact name of the process, not the window title + .exe You have a space between "RemoteCapture" and "DC" Judging from the Run function in your code, I would say that the space is not supposed to be there. However, once you get the ProcessWait line correct, you will find it to be useless for your script. Instead of the ProcessWait line, you might want a WinWait line that uses some window text unique to the completed process window. In other words, if you as a human can see something like "complete" or "done" in the application's final window - then maybe AutoIt can see that too. Use the AutoIt Window Info tool to see what text AutoIt should be able to detect. Run("C:\Program Files\Canon\CameraWindow\RemoteCaptureDC\RemoteCaptureDC.exe") WinWaitActive("RemoteCapture DC", "") ControlClick("RemoteCapture DC", "", "[iD: 1011]") WinWait("RemoteCapture DC", "Done") WinClose("RemoteCapture DC", "Done")
  7. It seems like you are pretty close to completing this, so here is a free bump to the front page while some of the smarter members are online :-) I know very little about the GUI functions and even less about WMI stuff. Let's see what others can do for you.
  8. Your ProcessWait line is probably just timing out... so it is nothing more than a 10 second sleep: Sleep(10000) Normally, the paramater fed to a ProcessWait line of code would the process name. From the help file under ProcessWait: Your ProcessWait line looks odd because there is no ".exe" extension. Also from the help file under ProcessWait: The info above is what ProcesWait does Your comment info from your code... ; waits ten seconds while photo is down loaded to hard drive ...seems to indicate that you think that ProcessWait waits for some process to complete. > ...because I have not yet worked out how to capture the "Return Value" yet... $ReturnValue = ProcessWait("RemoteCapture DC", 10) MsgBox(0, '"$ReturnValue equals...", $ReturnValue) It is best not to reply on Sleep lines of code. A fluctuation in CPU loading might cause your script to fail. It is better to look for some word(s) that are unique to the window shown once the photo has completed downloading to the HDD. Use the AutoIt Window Info tool to see what text in the window of interest AutoIt should be able to detect.
  9. Welcome to the forum. Are these worksheets within one file or different spreadsheets files? > ... it only opens the first .xlsm worksheet and does not go to the other worksheets, ... or > ... it only opens the first .xlsm spreadsheet and does not go to the other spreadsheets, ... or .................?
  10. This looks like it is for a game. Be aware that some games block automation - so this may not work.Global $Paused HotKeySet("`", "TogglePause") HotKeySet("{DEL}", "Terminate") While 1 Send("{RIGHT down}") Send("{NUMPAD4 down}") Sleep(500) WEnd Func TogglePause() $Paused = Not $Paused While $Paused Sleep(100) ToolTip('Script is "Paused"', 0, 0) WEnd ToolTip("") EndFunc ;==>TogglePause Func Terminate() Exit 0 EndFunc ;==>Terminate Func OnAutoItExit() Send("{RIGHT up}") Send("{NUMPAD4 up}") EndFunc
  11. Look here:http://www.autoitscript.com/autoit3/docs/functions/Send.htm Post whatever code you come up with after reading that page and then people can help you with the loop and maybe the memory part of your quest.
  12. Welcome to the forum. You might want to change ControlEnable to ControlFocus. Using ControlEnable can cause problems if the program was not ready for that control to be enabled. Also, your ProcessWait line seems odd, but if it works...... :-)
  13. Welcome to the forum. Some people hide the address bar within Windows (file) explorer; so your code might not work for them. If this code is just for your use and you don't want to use the command line info posted above for some reason (like reusing one explorer window to go to multiple locations) look into using the Control... functions instead of Send. They are more reliable. Run("explorer.exe") $errorCheck = WinWait("[class:ExploreWClass]", "", 5) If Not $errorCheck Then MsgBox(0, "Error", "WinWait timed out while opening Explorer.exe") Exit EndIf ControlFocus("[class:ExploreWClass]", "", "Edit1") ControlSetText("[class:ExploreWClass]", "", "Edit1", "C:\Documents and Settings\All Users\") Sleep(500) ControlSend("[class:ExploreWClass]", "", "Edit1", "{ENTER}")
  14. You will need some quotes in the right places:-)Run("explorer.exe /e,C:\Documents and Settings\All Users")
  15. No - the code that you have in there now is from exodius and it clicks every second and it is based on the sleep function.Look at post #2. picea892 gave you the code that you asked for... > "I want to click the left mouse button every 1 minute during that sleep and that sleep alone" But the code that you asked for will not be very accurate. In other words, it might wait 61 minutes or 58 minutes. You mentioned sleep, picea892 gave you code using sleep. If you can live with a few minutes here and there then using the sleep function is fine. Since this is for a game (I kinda thought that it was) I'll let others help you use/place the code that people are offering you or better yet, move you towards using the TimerInit/TimerDiff functions.
×
×
  • Create New...