AutoHotkey Community

It is currently May 27th, 2012, 2:10 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 13 posts ] 
Author Message
PostPosted: February 2nd, 2010, 4:23 pm 
Offline

Joined: February 2nd, 2010, 4:19 pm
Posts: 5
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 2nd, 2010, 5:09 pm 
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!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 2nd, 2010, 6:39 pm 
Offline

Joined: February 2nd, 2010, 4:19 pm
Posts: 5
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. :)

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 2nd, 2010, 7:00 pm 
Offline

Joined: November 10th, 2005, 11:26 pm
Posts: 169
Location: Texas
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 2nd, 2010, 7:12 pm 
Offline

Joined: February 2nd, 2010, 4:19 pm
Posts: 5
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 2nd, 2010, 8:40 pm 
Offline

Joined: July 6th, 2009, 9:58 pm
Posts: 678
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 ... lClick.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:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 2nd, 2010, 8:57 pm 
Offline

Joined: February 2nd, 2010, 4:19 pm
Posts: 5
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 ... lClick.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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 2nd, 2010, 9:04 pm 
Offline

Joined: July 6th, 2009, 9:58 pm
Posts: 678
CurlySue wrote:
Respectfully, I am NOT interested in AutoIt3. However, I may take some time to review your links.


AutoIt3 Windowspy =/= AutoIt.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 2nd, 2010, 9:05 pm 
Offline

Joined: February 2nd, 2010, 4:19 pm
Posts: 5
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/


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 2nd, 2010, 9:08 pm 
Offline

Joined: July 6th, 2009, 9:58 pm
Posts: 678
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 2nd, 2010, 9:23 pm 
Offline

Joined: December 18th, 2009, 6:08 pm
Posts: 63
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 2nd, 2010, 10:07 pm 
Offline

Joined: October 15th, 2007, 3:10 pm
Posts: 790
Location: England
"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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 2nd, 2010, 10:37 pm 
Offline

Joined: October 15th, 2007, 3:10 pm
Posts: 790
Location: England
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:


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], nimda, poserpro, rbrtryn, sjc1000 and 13 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group