AutoHotkey Community

It is currently May 27th, 2012, 11:00 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 81 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6
Author Message
 Post subject:
PostPosted: November 26th, 2010, 5:13 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
Version 0.9 was written in an earlier AHK version. The latest version (1.2) should work with the last AHK version. Do you have AHK 1.0.48.05? Did you add anything to Monster, or modified it?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 27th, 2010, 10:25 am 
Offline

Joined: June 13th, 2009, 11:19 am
Posts: 7
I do use Autohotkey 1.0.48.05
and I does not add anything to version 1.2

I just copy all the code, and run it.

But it always give an answer of -1.

Thank you very much.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 27th, 2010, 4:35 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
Maybe your application does not copy ASCII text to the clipboard. Try the script in Notepad or MS Word. If it is the case, a check for the foreground application and text conversion is necessary. (To see if it is the problem add a line "MsgBox %ClipBoard%" after the "ClipWait 0.5" line - it should show "1+2".) It is also possible that your application is too slow to set the clipboard. In this case increase the time limit, to something like "ClipWait 3.0".


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 28th, 2010, 3:21 pm 
Offline

Joined: June 13th, 2009, 11:19 am
Posts: 7
laszlo, thank you for your reply...

I do as your advise.

But I find that in my PC, this line is strange
Code:
RegExMatch(x, "(.*[^!\~±?\@\*/\\])(±|?)(.*)", y)


it return nothing when I just like select "1+2" to test

just like this following code cant get the right answer, the %test%, %y1% and %y3% are all empty.

I am not sure whether my AUTOHOTKEY version is right, but in the HELP file it says that it is 1.0.48.05


Code:
   d="111111111±222"
   test:=RegExMatch(d, "(.*[^!\~±?\@\*/\\])(±|?)(.*)", y)
   MsgBox "test"%test%"" "%y1%" "%y3%" "


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 28th, 2010, 5:32 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
I assume that you get the right string in ClipBoard ("1+2"), so the problem is not another AHK script or a clipboard manager.

You could test directly the expression evaluation with adding a line to the top of the script
MsgBox % Eval("1+2")

If it does not show 3, then there could be problems with AHK. You have to uninstall it then do a fresh install from the AHK main website.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 30th, 2010, 3:07 pm 
Offline

Joined: June 13th, 2009, 11:19 am
Posts: 7
Thank you, laszlo, thank you for your answered my questions patiently.

But when I MsgBox % Eval("1+2") directly in Autohotkey 1.0.48.05, it also get the wrong results.

Maybe something get wrong in my PC, let me try it carefully.

Thank you very much.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 81 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot], iDrug 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