AutoHotkey Community

It is currently May 27th, 2012, 6:22 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Switching to AHK_L
PostPosted: December 11th, 2010, 12:37 am 
Offline

Joined: July 9th, 2009, 1:13 am
Posts: 140
I want to make the switch to AHK_L but I have not been able to find the documentation I need to learn the differences between AHK and AHK_L. I am sure I will be insulted for not finding it, but I did look.

One of the things I am having trouble with are RegExMatch's. I have several patterns that will find a match in Classic, but fail in AHK_L. Everyone in the IRC chat assures me that there is no difference, but there must be. If I run one script in Classic and it works, and then run the very same script in L and it doesn't, a difference must exist.

Can anyone point me to AHK_L RegEx documentation.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 11th, 2010, 1:04 am 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5482
Location: the tunnel(?=light)
Can you post an example of code that succeeds in the original and fails in _L?

_________________
Image
Try Quick Search for Autohotkey or see the tutorial for newbies.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 11th, 2010, 1:08 am 
Offline

Joined: July 9th, 2009, 1:13 am
Posts: 140
Code:
If (RegExMatch(OrderToParse, "\[.+?[AP]M\][^æ]+?(?=(\[.+?[AP]M\]))", RegOut))
{
     msgbox, success
}



Variable In Use
Code:
Test

[John Public, 11/28/2010 7:27:34 AM]

Test

[John Public, 11/29/2010 8:45:55 AM]



The If statement evaluates True in Classic, false in L


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 11th, 2010, 1:15 am 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5482
Location: the tunnel(?=light)
Works fine for me in both, do you have your script saved as Unicode?

_________________
Image
Try Quick Search for Autohotkey or see the tutorial for newbies.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 13th, 2010, 4:47 pm 
Offline

Joined: July 9th, 2009, 1:13 am
Posts: 140
I don't think so, but I have not looked into unicode use in AHK. I have the file saved as a .ahk.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 13th, 2010, 5:42 pm 
Save the script with File Encoding UTF-8 (see the image here)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 13th, 2010, 7:12 pm 
Offline

Joined: July 9th, 2009, 1:13 am
Posts: 140
That did it, thank you!


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], hd0202 and 62 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