AutoHotkey Community

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

All times are UTC [ DST ]




Post new topic Reply to topic  [ 552 posts ]  Go to page Previous  1 ... 27, 28, 29, 30, 31, 32, 33 ... 37  Next
Author Message
 Post subject:
PostPosted: February 19th, 2011, 7:13 pm 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
IronRules wrote:
When will the full release that handles 100% native ahk code, in theory, be ready potentially?

I'm not sure, I haven't been focused much on this project due to other commitments. It would take roughly another 30 hours of work.

hokiepontas wrote:
Does IronAHK cross-compile on Windows? (That is, will it compile for OSX/linux on Windows?) If so, what do I need to do to make this happen.

Yes it does, when you compile a script you produce a binary that will run on any platform with Mono. I do not have specific instructions on OS X at this time.

dmatch wrote:
Using a label in a function gives a block not closed error.

Thanks I'll look into that soon.

IsNull wrote:
I'm quite not sure if it's intelligent to support Goto labels, as it leads to bad code and always can be written without.

If AutoHotkey supports them IronAHK will too ;)

IronAHK converts labels to functions which share the global variable scope. This is because AutoHotkey dynamically calls labels for GUI events, hotkeys and timers which in IronAHK becomes delegate invocation. There is no way to dynamically jump to a label in CIL or any other language as far as I know, so this was a major design challenge. Rest assured I personally think goto and gosub are useful shortcuts in a rapid development scripting language like this one, and I have no intention of removing them.

_________________
GitHubScriptsIronAHK Contact by email not private message.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 20th, 2011, 6:35 pm 
Offline
User avatar

Joined: May 10th, 2007, 10:54 am
Posts: 649
Location: .switzerland
Quote:
There is no way to dynamically jump to a label in CIL or any other language as far as I know

http://msdn.microsoft.com/en-us/library/13940fs2
C# supports goto in a save way, with one primary restriction: You can't jump out of current scope.

Quote:
If AutoHotkey supports them IronAHK will too

I expected that answer. And there are reasons for it - especially full compatibility, and as long as supporting goto doesn't have a heavy impact of the design from IA I don't mind. But spending lot of time to implement this is wasted time I guess. :)

However, if I look at Chris notices about AHK V2 to remove some problematic parts of AHK Syntax, there are also good reasons not to keep old problematic desicions just to have a full 1:1 compatibility.
jm2c

Btw: The following IA-Code produces strange Mid-Code:
Code:
   msgbox Hello World
   GoTo, Label2
   label1:
   msgbox Label1
   GoTo, LabExit
   Label2:
   msgbox Label2
   GoTo, Label1
   LabExit:
   msgbox Exitting now
   ExitApp

It seems that there are unnecessary GoTo Calls after the "return" of the generated code:
Code:

CreateTrayMenu()
msgbox("Hello World")
goto Label2
Exit(0)

label1(args)
{
  global
  msgbox("Label1")
  goto LabExit
  return
  goto Label2
  goto Label2

}

Label2(args)
{
  global
  msgbox("Label2")
  goto Label1
  return
  goto LabExit
  goto LabExit

}

LabExit(args)
{
  global
  msgbox("Exitting now")
  ExitApp()
}


In case of GoTo/Label in non global functions, it should not be allowed to jump in there from outside...

And just remember:
Quote:
If you find yourself needing to use the goto statement. Reconsider.
:lol:

_________________
http://securityvision.ch
AHK 2D GAME ENGINE


Report this post
Top
 Profile  
Reply with quote  
PostPosted: February 21st, 2011, 10:38 am 
I tried to run IronAHK-0.7.0.37106.exe on my computer (windows xp) . But one box appeared that tell "IronAHK has encountered a problem and need to close. We are sorry for the inconvenience". I don't why, I hope someone here know what the problem with my computer.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2011, 11:52 am 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
IsNull wrote:
http://msdn.microsoft.com/en-us/library/13940fs2
C# supports goto in a save way, with one primary restriction: You can't jump out of current scope.

In cases like SetTimer, %MyLabel% there is no way for the script compiler engine to know where to jump to. The only way to achieve this is to use delegates and dynamically lookup local methods at runtime. This is why all labels in IronAHK have to be converted to special types of functions.

IsNull wrote:
Btw: The following IA-Code produces strange Mid-Code: ... It seems that there are unnecessary GoTo Calls after the "return" of the generated code:

That can be solved with some simple optimisation logic that stops pushing opcodes after the first unconditional return statement. For now it does no harm other than add a few bytes to the compiled assembly.

helpmeplease_ wrote:
I tried to run IronAHK-0.7.0.37106.exe on my computer (windows xp) . But one box appeared that tell "IronAHK has encountered a problem and need to close. We are sorry for the inconvenience". I don't why, I hope someone here know what the problem with my computer.

Do you have .NET 2.0 installed? You can find downloads from Windows Update or http://www.microsoft.com/downloads/en/d ... 86F32C0992

_________________
GitHubScriptsIronAHK Contact by email not private message.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 25th, 2011, 12:39 pm 
Offline

Joined: February 23rd, 2006, 7:43 pm
Posts: 168
Location: Portugal
I'm having troubles using AHK scripts in ironahk, namely the usage of lines like:

Code:
StringGetPos, pos, tmp, alt=`"%carta%


it "errors" with: ==> Unterminated string

Can you solve it?
I need to search for a content that starts with a " but i don't now all of the contents until the closure of it... :S

-------------------------------------------------------------------------------

OTHER problem is with the following code:
Code:
Loop {
    Msgbox, ola
}

MsgBox, done!

It doesn't show any of the loop-inside msgbox... It directly shows up the done! msgbox :(
Am I doing anything wrong?
FOUND a solution:
Code:
Loop
{
    Msgbox, ola
}
Works :)

-----------------------------------------------------------------------------------

ANOTHER problem:
Code:
carta=234
StringLeft, qtd, carta, 1
Msgbox, %qtd%
StringLeft, qtd, %carta%, 1
Msgbox, %qtd%

Unlike in AHK, the first StringLeft stores in "qtd" the letter c (of carta), instead of 2 (of the contents of carta)... :S
Although the second StringLeft solves it (but isn't compatible with AHK)...

-----------------------------------------------------------------------------------

Finally and i'm done for now with ironahk (it needs lots of work to perform the basics... can't use it right now with all this bugs :( ):
Code:
   carta = waste, more waste
   StringReplace, carta2, carta, `,, . , All
   Msgbox, carta2=%carta2%
   StringReplace, carta2, carta, `,,  , All
   Msgbox, carta2=%carta2%
   StringReplace, carta2, carta, `,, "" , All
   Msgbox, carta2=%carta2%
   StringReplace, carta2, carta, `,, % "" , All
   Msgbox, carta2=%carta2%

Outputs:
1st: waste. more waste >>> CORRECT
2st: NONE >>> It should remove all the commas (as it does in AHK) but istead it erases all the contents
3rd: waste"" more waste >>> (?) it appends the double Quotation mark
4th: NONE >>> it messes the contents up, and erases all of it!


Last edited by Pacheco on February 25th, 2011, 2:41 pm, edited 4 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 25th, 2011, 12:46 pm 
Offline

Joined: October 15th, 2007, 3:10 pm
Posts: 790
Location: England
You could possibly try:
Code:
StringGetPos, pos, tmp, % "alt=""" carta


(untested)

_________________
My code is written for AHK Basic unless otherwise specified. This means it may not work in AHK_L (especially Unicode), due to a few known compatibility issues.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 25th, 2011, 12:52 pm 
Offline

Joined: February 23rd, 2006, 7:43 pm
Posts: 168
Location: Portugal
OceanMachine wrote:
You could possibly try:
Code:
StringGetPos, pos, tmp, % "alt=""" carta

(untested)

It worked bypassing the interpreter, but it don't have the same effects as the other line in ahk :S


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 25th, 2011, 1:48 pm 
Offline

Joined: October 15th, 2007, 3:10 pm
Posts: 790
Location: England
So are you saying
Code:
StringGetPos, pos, tmp, alt=`"%carta%
works in AHK Basic or AHK_L? But not in IronAHK? In which case it should possibly be considered a bug, but let polyethene comment first.

_________________
My code is written for AHK Basic unless otherwise specified. This means it may not work in AHK_L (especially Unicode), due to a few known compatibility issues.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 25th, 2011, 4:10 pm 
Offline
User avatar

Joined: November 2nd, 2008, 4:23 pm
Posts: 2906
Location: 127.0.0.1
There's no need to escape the quote.

_________________
aboutscriptappsscripts
Any code ⇈ above ⇈ requires AutoHotkey_L to run


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 25th, 2011, 5:40 pm 
Offline

Joined: October 15th, 2007, 3:10 pm
Posts: 790
Location: England
@Frankie - although this is the case, I think Pacheco is saying that line works in AHK but not in IronAHK.

_________________
My code is written for AHK Basic unless otherwise specified. This means it may not work in AHK_L (especially Unicode), due to a few known compatibility issues.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 26th, 2011, 11:41 am 
Offline
User avatar

Joined: May 10th, 2007, 10:54 am
Posts: 649
Location: .switzerland
@Pacheco: IronAHK is not stable yet, so don't use it for serious work. Some things are just not implemented and others are not stable. However, helping us to find bugs is always apreciated :)

@Poly:
I've made some refactoring and added Input Command (well 80% of it is done), see my last commits: https://github.com/IsNull/IronAHK/commits/master

I've had to un-nest the KeyBoardHook-Class and add an KeyPressed - Event to it, as the InputCommand needs to know when a key was pressed.

Otherwise the full InputCommand Logic must be contained in the KeyboardHook whats not optimal. Hotkey & Hotstring Behaviour could also be uncoupled from the KeyboardHook this way.

Edit:
I fixed a bug in SendMixed(sequence) Method. (Specail Keys {specail}) were sent always before normal Keys. eg:
Code:
Send, Hello{BackSpace}
;--> resulted in {Backspace}Hello

As Key and KeyStream Parsing to the Keys enum is used in many other places (like the Key Parsing for the Endkeysin the Input Command) I moved it to a separate KeyParser Class. Fix

We have to discuss several points as soon as you have some time. After that I send you a merge Request.

_________________
http://securityvision.ch
AHK 2D GAME ENGINE


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2011, 5:31 am 
Offline

Joined: November 28th, 2007, 9:54 am
Posts: 69
I get the error with no line number. Where do i start?

script.ahk:0 - Top type can not be null

Also got FileInstall command error but rem'ed it out.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2011, 9:19 am 
Offline
User avatar

Joined: May 10th, 2007, 10:54 am
Posts: 649
Location: .switzerland
Hi L-Cartinine,

Please use the offical IA Bug Report Form.

It would be nice if you can provide your script code (or just the part which produces the error) that we can reproduce the error and investigate further.

Thank you!

_________________
http://securityvision.ch
AHK 2D GAME ENGINE


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2011, 12:46 pm 
Offline

Joined: November 28th, 2007, 9:54 am
Posts: 69
What causes that error?


Last edited by L-Cartinine on March 10th, 2011, 10:50 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject: OSX
PostPosted: March 10th, 2011, 1:38 pm 
Hi all,

my msgbox is working on OSX 10.6.6 (using not compiled script)
but the code below do nothing:

Code:
Gui, Add, Text,X0 Y0, addedText
Gui, Show, W800 H28 X0 Y30
SplashTextOn, 400, 300, Toto, Titi


I have installed mono with the std mono installer, xclock/xterm is working

Versions are the last ones available
Any idea ?

Thanks a lot
Francois


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 552 posts ]  Go to page Previous  1 ... 27, 28, 29, 30, 31, 32, 33 ... 37  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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