AutoHotkey Community

It is currently May 26th, 2012, 11:10 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: October 31st, 2009, 8:13 am 
Offline

Joined: October 31st, 2009, 7:57 am
Posts: 2
When I send commands to Monopoly Tycoon Demo through AutoHotKey, it crashes Monopoly Tycoon Demo. When I send the commands manually, it works as expected.

Steps to reproduce:
[list=]Download and install Monopoly Tycoon Demo from here or run this script, which should download and install the demo for you;[/list]
[list=]Running the application and clicking "Play" works as expected;[/list]
[list=]However, running this script, which should be the same, makes the program give an error message in Windows XP;[/list]
[list=]This script, which just sends an Enter instead of clicking "Play" also crashes in the same way. [/list]

Please let me know if I can provide any more details.

[Moved from Bug Reports forum. ~jaco0646]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 31st, 2009, 8:36 am 
This should be posted in Ask For Help, before posting here in Bug Reports. There is no indication that this is an AHK problem and not a problem with the application (or even the application trying to defeat ACH scripting).

Mod, if you disagree, I will not take offence if you delete my post. ;)


Report this post
Top
  
Reply with quote  
 Post subject: Really?
PostPosted: October 31st, 2009, 8:50 am 
Offline

Joined: October 31st, 2009, 7:57 am
Posts: 2
Thanks for your comment.

If you click "Play" manually, this application works. If you ask AHK to automate clicking "Play", it crashes. It is repeatable and is evidenced by the linked scripts. I thought the point of AHK was to simulate clicking things manually. In this case, AHK is causing different behaviour than clicking things manually, so it seems like a bug to me.

I cannot see what help people can give me with a one line command crashing a program, but I'm happy to post it there if that would be more useful.

I am pretty sure that Monopoly Tycoon was written before AHK, so I doubt that it is deliberate!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 1st, 2009, 1:45 am 
Offline

Joined: May 28th, 2008, 2:11 am
Posts: 739
Location: Minnesota, USA
It may not be targeting programs like AHK directly, but it is possible that there is an anti-cheat mechanism in the game. By what you described this seems like a problem with the game itself or your script's interaction with it, not a problem with AHK. Take the last guy's advice and post your script in Ask For Help.

_________________
Unless otherwise stated, all code is untested

(\__/) This is Bunny.
(='.'=) Cut, copy, and paste bunny onto your sig.
(")_(") Help Bunny gain World Domination.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 1st, 2009, 7:43 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7502
Location: Australia
ControlClick sends standard Windows messages such as WM_LBUTTONDOWN and WM_LBUTTONUP to simulate "clicking" on a specific window. It isn't intended to (and couldn't possibly) behave the same as a physical mouse click. Send with the default send mode (SendEvent) uses keybd_event to simulate keyboard input; AutoHotkey merely uses it to "tell" the operating system which key to simulate, and the operating system does the rest. I think it is very unlikely that AutoHotkey is at fault here.
Quote:
I am pretty sure that Monopoly Tycoon was written before AHK, so I doubt that it is deliberate!
FYI, the methods employed by these two commands have existed long before Monopoly Tycoon was published.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 4th, 2009, 3:47 pm 
Offline

Joined: February 2nd, 2008, 4:35 am
Posts: 643
Send has no "," according to the help

"WINDOW_WAIT("Monopoly Tycoon","Monopoly Tycoon Demo v1.0",20)"
Does this function consist of "WinWait, WinTitle, WinText, Seconds"?

"Sleep, 300"
Is is possible that this is not enough time for window to "settle"?


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], joetazz, JSLover, Kirtman, rbrtryn, Tipsy3000 and 59 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