BChat Posted November 27, 2007 Share Posted November 27, 2007 I have a script:HotKeySet("^+{PGUP}", "_Send")While 1 Sleep(5000)WEndFunc _Send() Send ("xxxxxxx")WinWaitActive("Untitled", "", 0) Send ("{TAB}")WinWaitActive("Untitled", "", 0) Send("yyyyyyyy")EndFunc_____________________________________It was working fine until I re-booted or used Acronis True Image 10 to make an image of the drives. I am not sure which incident cause the issue, but now stops after completing Send ("xxxxxxx"). I have the same issue with the XP Home and the Vista Ultimate set up - separate HDs. Both are set up to run the script at startup, both show the icon in the tray at startup. I assume there is a problem with the script, but have no idea what is causing the partial execution. Link to comment Share on other sites More sharing options...
JustinReno Posted November 27, 2007 Share Posted November 27, 2007 Reduce the sleep to 10 and see what happens. Link to comment Share on other sites More sharing options...
BChat Posted November 27, 2007 Author Share Posted November 27, 2007 I tried it - same results. It stops after ''send xxxxxxx". Thanks for the suggestion. Link to comment Share on other sites More sharing options...
Generator Posted November 27, 2007 Share Posted November 27, 2007 Reduce the sleep to 10 and see what happens.I assumed you know that Hotkey can be called anytime during a script's execution regardless sleep.Try to see if there's any differences after you reboot the program, maybe change in title, or not in focus. Link to comment Share on other sites More sharing options...
martin Posted November 27, 2007 Share Posted November 27, 2007 I assumed you know that Hotkey can be called anytime during a script's execution regardless sleep.Try to see if there's any differences after you reboot the program, maybe change in title, or not in focus.Yes, I would expect that the problem is that you don't know what application is receiving the 'xxxxxxx.' so the window you are waiting for doesn't get activated. Can you WinActivate the window you want to receive the x string first? There might also be more than one window with the title 'Untitled' so perhaps check for that. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
BChat Posted November 27, 2007 Author Share Posted November 27, 2007 If I placed the cursor in a cell in an Excel spreadsheet it would send "x" to the cell, tab to the next cell and send "y". If I placed the cursor in a Word document, same thing x - tab - y. If I placed the cursor in the User Name filed of a web site the x was placed there, then it would tab to the p/w field and send the y. I could always see where the x was going, followed by the tab - y. I did nothing to the script - rebooted the machine and also made the HD image as mentioned above. Now the the x is sent, and I can see it, but the scripts stops. I am baffled as to why the "untouched" script stopped working. It seems to me it might be something other than the script. Thanks for the suggestions. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now