AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AHK overruns windows - icon position arrives B4 windows open

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
CurlySue



Joined: 02 Feb 2010
Posts: 5

PostPosted: Tue Feb 02, 2010 3:23 pm    Post subject: AHK overruns windows - icon position arrives B4 windows open Reply with quote

Using AutoHotKey, version 1.0.48.5, with AutoScriptWriter, file version 2.0.0.0, I created over a dozen mouse-click saving "executables" that I use daily.

I love this software and recommend it frequently to family, friends and clients.

All but one of my AutoHotKey executables work wonderfully. The one I have problems with consistently involves eleven (11) mouse clicks associated with executing CHKDSK C under Windows XP SP2.

In short, there are several windows that pop up or open and AutoHotKey's speed often overruns these windows (meaning, the mouse icon position arrives before the window fully opens). As a result, this particular AHK executable fails about 90% of the time.

I must admit, I have not researched this issue thoroughly because the remaining 10 to 15 executables work perfectly every time. Of course, they involve notably few mouse clicks and or windows the pop up or open.

Using AutoScriptWriter, file version 2.0.0.0, is there a way to adjust the speed at which the mouse icon travels for a single executable creation (meaning that I would prefer that my remaining 10 to 15 executables to run at their current speeds)?

Thanks in advance,

CurlySue
Back to top
View user's profile Send private message
q&a
Guest





PostPosted: Tue Feb 02, 2010 4:09 pm    Post subject: Reply with quote

Sounds to me like you need to add winwait, ifwinactive, ifwinexist etc..
The only way to know what really going on is if you post your code!
Back to top
CurlySue



Joined: 02 Feb 2010
Posts: 5

PostPosted: Tue Feb 02, 2010 5:39 pm    Post subject: Reply with quote

q&a wrote:
Sounds to me like you need to add winwait, ifwinactive, ifwinexist etc..
The only way to know what really going on is if you post your code!


Good point. Thanks for chiming in. Smile

Removing all the colons after the letter C when within parenthesis, here is my CHKDSK_C.ahk file:

WinWait, Program Manager,
IfWinNotActive, Program Manager, , WinActivate, Program Manager,
WinWaitActive, Program Manager,
MouseClick, left, 42, 46
Sleep, 100
WinWait, My Computer,
IfWinNotActive, My Computer, , WinActivate, My Computer,
WinWaitActive, My Computer,
MouseClick, right, 48, 247
Sleep, 100
MouseClick, left, 69, 583
Sleep, 100
WinWait, Local Disk (C) Properties,
IfWinNotActive, Local Disk (C) Properties, , WinActivate, Local Disk (C) Properties,
WinWaitActive, Local Disk (C) Properties,
MouseClick, left, 83, 43
Sleep, 100
MouseClick, left, 269, 133
Sleep, 100
WinWait, Check Disk Local Disk (C),
IfWinNotActive, Check Disk Local Disk (C), , WinActivate, Check Disk Local Disk (C),
WinWaitActive, Check Disk Local Disk (C),
MouseClick, left, 28, 65
Sleep, 100
MouseClick, left, 160, 194
Sleep, 100
WinWait, Checking Disk Local Disk (C),
IfWinNotActive, Checking Disk Local Disk (C), , WinActivate, Checking Disk Local Disk (C),
WinWaitActive, Checking Disk Local Disk (C),
MouseClick, left, 345, 122
Sleep, 100
WinWait, Local Disk (C) Properties,
IfWinNotActive, Local Disk (C) Properties, , WinActivate, Local Disk (C) Properties,
WinWaitActive, Local Disk (C) Properties,
MouseClick, left, 142, 424
Sleep, 100
WinWait, My Computer,
IfWinNotActive, My Computer, , WinActivate, My Computer,
WinWaitActive, My Computer,
MouseClick, left, 37, 41
Sleep, 100
MouseClick, left, 55, 380
Sleep, 100

After posting this script, I think that I know what I need to add. According to the HELP file, SetDefaultMouseSpeed effects speed. Therefore, I believe I need to experiment with this setting - for example, add... SetDefaultMouseSpeed, 5 ...before MouseClick, left, 42, 46. Or, should it be placed earlier?

Thanks again!!

CurlySue
Back to top
View user's profile Send private message
Bartimus



Joined: 10 Nov 2005
Posts: 164
Location: Texas

PostPosted: Tue Feb 02, 2010 6:00 pm    Post subject: Reply with quote

CurlySue,
Not trying to rain on your parade, but wouldn't executing check disk like this be more efficient:
Code:
run, ChkDsk c:

Or are you really needing the GUI version?
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
CurlySue



Joined: 02 Feb 2010
Posts: 5

PostPosted: Tue Feb 02, 2010 6:12 pm    Post subject: Reply with quote

CurlySue wrote:
Bartimus wrote:
CurlySue,
Not trying to rain on your parade, but wouldn't executing check disk like this be more efficient:
Code:
run, ChkDsk c:

Or are you really needing the GUI version?


My primary HDD is partitioned to C:\ F:\ and G:\ drives with NTFS. I also have a secondary HDD (non-RAID configuration) partitioned to H:\ K:\ and L:\ drives. Drives D:\ and E:\ are 22X DVD+/-RW burners (one Lightscribe)

Prior to using AutoHotKey, I was using an inferior script running program. When I tried implementing "run, CHKDSK C:" (without quotes), Windows XP SP2 defaulted to CHKDSK F: every time.

When I found AutoHotKey, I tried to implement it, but (as before), Windows XP SP2 defaults to CHKDSK F: every time.

For my F:\ G:\ H:\ K:\ and L:\ drives, I use AutoHotKey to implement the same script for each drive respectively. In other words, I do not use mouse click scripts for these drives.

So... for my C:\ drive, you might be correct when you asked am I "...really needing the GUI version?" At this time, given the "defaulting" issue describe above, I believe the correct answer is, yes.

Do you see things differently?

CurlySue
Back to top
View user's profile Send private message
randallf



Joined: 06 Jul 2009
Posts: 678

PostPosted: Tue Feb 02, 2010 7:40 pm    Post subject: Reply with quote

You can do this entirely without mouse clicks. This is all MS stuff so you should be able to use window controls at least...

I recommend getting out that AutoIt3 window spy and reading up on the following:

http://www.autohotkey.com/docs/commands/Run.htm
http://www.autohotkey.com/docs/commands/WinWait.htm
http://www.autohotkey.com/docs/commands/ControlClick.htm

Also, chkdsk f: works fine on my XPSP2 machine from the command prompt, telling me it should work find from AHK run:
Code:
Run, ChkDsk F:
Back to top
View user's profile Send private message
CurlySue



Joined: 02 Feb 2010
Posts: 5

PostPosted: Tue Feb 02, 2010 7:57 pm    Post subject: Reply with quote

randallf wrote:
You can do this entirely without mouse clicks. This is all MS stuff so you should be able to use window controls at least...

I recommend getting out that AutoIt3 window spy and reading up on the following:

http://www.autohotkey.com/docs/commands/Run.htm
http://www.autohotkey.com/docs/commands/WinWait.htm
http://www.autohotkey.com/docs/commands/ControlClick.htm

Also, chkdsk f: works fine on my XPSP2 machine from the command prompt, telling me it should work find from AHK run:
Code:
Run, ChkDsk F:


Respectfully, I am NOT interested in AutoIt3. However, I may take some time to review your links.

Also, kindly re-read my post regarding RUN, CHKDSK C: and why it DOES NOT WORK on my XP SP2 machine. I am not surprised in the least that RUN, CHKDSK F: works on YOUR machine - as I stated in my previous posting, RUN, CHKDSK F: works on MY machine as well. BUT, run, chkdsk c: DOES NOT (with explanation detailed in MY previous posting).

Allow me to reiterate, once again, I have NO PROBLEM with RUN, CHKDSK F: using AHK. In addition, I have NO PROBLEM with RUN, CHKDSK G:, or RUN, CHKDSK H:, or RUN, CHKDSK K:, or RUN, CHKDSK L:

As I stated in my previous posting, I do HAVE PROBLEMS with run, chkdsk c: (stated 2 or 3 times now).

Regards,

CurlySue
Back to top
View user's profile Send private message
randallf



Joined: 06 Jul 2009
Posts: 678

PostPosted: Tue Feb 02, 2010 8:04 pm    Post subject: Reply with quote

CurlySue wrote:

Respectfully, I am NOT interested in AutoIt3. However, I may take some time to review your links.


AutoIt3 Windowspy =/= AutoIt.
Back to top
View user's profile Send private message
CurlySue



Joined: 02 Feb 2010
Posts: 5

PostPosted: Tue Feb 02, 2010 8:05 pm    Post subject: Reply with quote

randallf wrote:
CurlySue wrote:

Respectfully, I am NOT interested in AutoIt3. However, I may take some time to review your links.


AutoIt3 Windowspy =/= AutoIt.


NOT interested in . . . http://www.autoitscript.com/autoit3/
Back to top
View user's profile Send private message
randallf



Joined: 06 Jul 2009
Posts: 678

PostPosted: Tue Feb 02, 2010 8:08 pm    Post subject: Reply with quote

CurlySue wrote:
randallf wrote:
CurlySue wrote:

Respectfully, I am NOT interested in AutoIt3. However, I may take some time to review your links.


AutoIt3 Windowspy =/= AutoIt.


NOT interested in . . . http://www.autoitscript.com/autoit3/


NOT THE... yeah. OK good luck.
Back to top
View user's profile Send private message
ton80



Joined: 18 Dec 2009
Posts: 62

PostPosted: Tue Feb 02, 2010 8:23 pm    Post subject: Reply with quote

randallf wrote:
CurlySue wrote:
randallf wrote:
CurlySue wrote:

Respectfully, I am NOT interested in AutoIt3. However, I may take some time to review your links.


AutoIt3 Windowspy =/= AutoIt.


NOT interested in . . . http://www.autoitscript.com/autoit3/


NOT THE... yeah. OK good luck.


Lol... Thanks for the entertainment. CurlySue - Randall is pointing you to a tool to use to help you accomplish your task, he isn't referring you to AutoIT3.
Back to top
View user's profile Send private message
OceanMachine



Joined: 15 Oct 2007
Posts: 780
Location: England

PostPosted: Tue Feb 02, 2010 9:07 pm    Post subject: Reply with quote

"AutoIt3 Window Spy" is a tool that is included with AHK - check your Start menu (if you installed AHK) - it's there! It's not actually anything to do with AutoIt3 any more.

As AHK actually originally started life as AutoIt many moons ago, the original Window Spy tool that was used with AutoIt is now used with AHK - but the 2 programs are now very different, as I'm sure you can tell.
Back to top
View user's profile Send private message
OceanMachine



Joined: 15 Oct 2007
Posts: 780
Location: England

PostPosted: Tue Feb 02, 2010 9:37 pm    Post subject: Reply with quote

CurlySue wrote:
When I tried implementing "run, CHKDSK C:" (without quotes), Windows XP SP2 defaulted to CHKDSK F: every time.

When I found AutoHotKey, I tried to implement it, but (as before), Windows XP SP2 defaults to CHKDSK F: every time.


Can you please try the below commands one at a time, to see whether you get the same results?

First option:
Code:
SetWorkingDir, C:\ ; setting the working directory first
Run, chkdsk C:


Second option:
Code:
Run, %comspec% /c chkdsk.exe C: ; using %comspec% instead seeing if that helps


Third option:
Code:
SetWorkingDir, C:\ ; both options together
Run, %comspec% /c chkdsk.exe C:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group