AutoHotkey Community

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

All times are UTC [ DST ]




Post new topic Reply to topic  [ 552 posts ]  Go to page Previous  1 ... 22, 23, 24, 25, 26, 27, 28 ... 37  Next
Author Message
 Post subject:
PostPosted: November 9th, 2010, 8:07 am 
Offline
User avatar

Joined: May 10th, 2007, 10:54 am
Posts: 649
Location: .switzerland
I think you are in trouble with the .exe extension.

.NET Application actually dont have the PE Format (to be correct - they have a little loader, which loads the .NET parts itself into the CLR under Windows) but you dont need wine to run .NET Apps - Mono extracts the bytecode from the pseudo exe file (IronAHK.exe) and runs the code.

The bad thing is, that MS decided to keep the exe/dll extensions and you expect native machine code - whats wrong (except of the loader).

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 9th, 2010, 8:32 am 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
specter333 wrote:
1. .ahk scripts will open just by double clicking the icon. their set to open with IronAHK. .exe script will only open using wine, not on their own. Is this normal? It seems like they should be independent.

Your desktop environment probably assigned .ahk to IronAHK after the first time but you can explicitly specify this by writing the following line at the top of your scripts: #/usr/bin/env ironahk
On Windows this is ignored.

specter333 wrote:
2. Using scripts to open folders and apps. It seems the script I wrote with IronAHK won't do anyting but execute other ahk commands. Same results whether running uncompiled with IronAHK or compiled with wine.

IronAHK is not designed to be run under Wine, only Mono or .NET. On my Ubuntu setup I have Mono installed but not Wine, so double clicking .exe files opens them with Mono. On the command line you can run mono compiled.exe to avoid Wine.

I tested the Run command and found three errors that I will fix when I get back later today, thanks.

_________________
GitHubScriptsIronAHK Contact by email not private message.


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

Joined: February 23rd, 2006, 7:43 pm
Posts: 168
Location: Portugal
polyethene wrote:
specter333 wrote:
(....)

I tested the Run command and found three errors that I will fix when I get back later today, thanks.

Hi polyethene,
As you will correct Run, i'm just asking: why there isn't a RunWait?
An as there isn't how can i simulate it in linux (ubuntu)?

Thx


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 9th, 2010, 12:52 pm 
Offline

Joined: February 5th, 2007, 12:19 pm
Posts: 192
Location: Osnabrück, Germany
Maybe i find a small error in declaring functions. I tried to use mod(), but this didn't work.
So i write my own modulo() function:
Code:
dividend :=-5
divisor:=-3
modtest := modulo(dividend,divisor)
msgbox,%modtest%
exitapp
 
modulo(dividend, divisor){
 Return dividend-dividend//divisor*divisor
}

The function works correct until you have a parameter with an uppercase letter in the function declaration.
Code:
modulo(Dividend, divisor){...}

I tried some other functions and find that a parameter with an uppercase has the value 0.

Don't know if this error? is mentioned before.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 10th, 2010, 2:09 am 
IronAHK seems to have problems with the "++" / "--" operators.
Throws up an "Could not look up method VariableName" Error.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 10th, 2010, 10:46 pm 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
Pacheco wrote:
As you will correct Run, i'm just asking: why there isn't a RunWait?

Fixed in 37f2b9, 3964c0, 1cdf6f and c9b675 thanks.

haichen wrote:
I tried to use mod(), but this didn't work.

Fixed in e02086 thanks.

haichen wrote:
The function works correct until you have a parameter with an uppercase letter in the function declaration.

Fixed in 3102f4.

RandomDude wrote:
IronAHK seems to have problems with the "++" / "--" operators.

As a postfix operator (i.e. x++ but not ++x) it seems to fail in expressions, I will take a look tomorrow. Thanks for notifying me.

_________________
GitHubScriptsIronAHK Contact by email not private message.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 11th, 2010, 9:59 am 
Offline

Joined: January 15th, 2007, 2:37 pm
Posts: 573
polyethene wrote:
IronAHK is not designed to be run under Wine, only Mono or .NET.

It turned out I only had the Mono development packages installed, not Mono itself. Installing Mono solved the problem.

Quote:
I tested the Run command and found three errors that I will fix when I get back later today, thanks.

Run is now working for launching files and opening folders. However I can't run a variable like in my test script I made to open a file called "testopen.txt".
Code:
IniRead, selected, /home/owner/IronAHK/selected.ini, xselected, selected

Gui, Add, Text, x20 y0 , Select File

Gui, Add, Edit, x20 y30 w275 h20 v1selected, %selected%
Gui, Add, Button, x300 y30 w20 h20 gselectfile, ...

Gui, Add, Button, x20 y60 w100 h30, Submit 
Gui, Add, Button, x120 y60 w100 h30, Result
Gui, Add, Button, x220 y60 w100 h30, Expected
Gui, Add, Button, x20 Y100 w100 h30, Edit
Gui, Add, Button, x120 y100 w100 h30, Reload
Gui, Add, Button, x220 y100 w100 h30, Exit


Gui, Show, x375 y375 h170 w350, Run command test.
Return

selectfile:
FileSelectFile, fselected, 3, , Open a file,
IniWrite, %fselected%, /home/owner/IronAHK/selected.ini, xselected,selected
Reload
Return

ButtonSubmit:
Run, %selected%
Return

ButtonResult:
MsgBox, %selected%
Return

ButtonExpected:
Run, /home/owner/IronAHK/testopen.txt
Return

ButtonEdit:
Run, /home/owner/IronAHK/runtest.ahk
Return

ButtonReload:
Reload
Return

ButtonExit:
Gui, Destroy
Exit App


The selected.ini simply looks like this.
Code:
[xselected]
selected = /home/owner/IronAHK/testopen.txt


As you can see the "Submit" button should open the file selected in the box above but I don't get any result from it. The "Result" button shows the variable and the "Expected" button is the entire command typed out to assure myself it should work.

Any ideas on that? Thanks again for all your hard work on this.


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

Joined: August 18th, 2009, 12:07 pm
Posts: 375
Location: holland
Hello, I find the first post unclear,
Where do I download a stable(ish) version instead of the latest night build
Are there any docs and where do I find them
Install advice

shouldnt this be in the first post?

_________________
"Choose your parents wisely"


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 11th, 2010, 11:16 am 
Offline

Joined: January 15th, 2007, 2:37 pm
Posts: 573
"HelloWorld" wrote:
Hello, I find the first post unclear,
Where do I download a stable(ish) version instead of the latest night build
Are there any docs and where do I find them
Install advice

shouldnt this be in the first post?


The way I understand it is this is still in it's Alpha version meaning still being developed and tested. There is not yet a stable build only the nightly ones to fix errors and add features.

However I'm finding it developed well enough to be very useful on Ubuntu.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 11th, 2010, 11:33 am 
Offline

Joined: August 18th, 2009, 12:07 pm
Posts: 375
Location: holland
yes I realize it is unfinished work! but wondered if there were "Very experimental"
nightly build that were best to avoid for now?
Would still like some install advice on first post(or link to)
and a doc link

_________________
"Choose your parents wisely"


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 11th, 2010, 1:52 pm 
Offline

Joined: January 15th, 2007, 2:37 pm
Posts: 573
"HelloWorld" wrote:
yes I realize it is unfinished work! but wondered if there were "Very experimental"
nightly build that were best to avoid for now?
Would still like some install advice on first post(or link to)
and a doc link


What OS are you using. polyethene gave me some instructions for Ubuntu, look at the very last post on page 24.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 11th, 2010, 6:56 pm 
Offline

Joined: August 18th, 2009, 12:07 pm
Posts: 375
Location: holland
yes I know I will be able to find all this out and thanks for the advice but my Point was that It is best if I dont have to look through all the post till page 24 or whatever.
It should be in the First post.

_________________
"Choose your parents wisely"


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 13th, 2010, 1:38 am 
I am trying to get IronAHK to compile the example script on Ubuntu 10.10. Here is the error message I get.

Code:
Installation complete
frankie@{computer name edited out}$ ironahk --out compiled.exe Example.ahk

** (/usr/lib/IronAHK/IronAHK.exe:2493): WARNING **: The following assembly referenced from /usr/lib/IronAHK/IronAHK.exe could not be loaded:
     Assembly:   System.Windows.Forms    (assemblyref_index=1)
     Version:    2.0.0.0
     Public Key: b77a5c561934e089
The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (/usr/lib/IronAHK/).


** (/usr/lib/IronAHK/IronAHK.exe:2493): WARNING **: Could not load file or assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.
File name: 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

Did I install it wrong? I followed these instructions:
Quote:
Code:
wget http://www.ironahk.net/download/nightly/zip
unzip zip
rm zip
cd IronAHK
chmod +x setup.sh
fromdos setup.sh
sudo ./setup.sh install
ironahk --out compiled.exe Example.ahk
./compiled.exe

I also tried calling it just as ironahk Example.ahk.

BTW: I am somewhat new to linux in general but I know the basics.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 13th, 2010, 11:07 am 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
Frankie n-l-i wrote:
I am trying to get IronAHK to compile the example script on Ubuntu 10.10. Here is the error message I get.

In terminal run sudo apt-get install libmono-winforms2.0-cil or install the package from your package manager.

"HelloWorld" wrote:
nightly build that were best to avoid for now?

The nightly builds are the only releases available at the moment. They are compiled against the master branch on the git repository which is refreshed midnight (GMT). The tagged milestone versions are considered less stable. All highly experimental work is done locally in branches so the builds are not affected.

For debugging:
specter333 wrote:
What OS are you using. polyethene gave me some instructions for Ubuntu, look at the very last post on page 24.

I'll make sure my next commit includes detailed instructions in the documentation.

specter333 wrote:
Run is now working for launching files and opening folders. However I can't run a variable like in my test script I made to open a file called "testopen.txt".

The INI commands use native functions in Windows but my own parser on Unix. I will add NUnit tests for both versions to check the results are identical.

_________________
GitHubScriptsIronAHK Contact by email not private message.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 13th, 2010, 3:00 pm 
Offline
User avatar

Joined: November 2nd, 2008, 4:23 pm
Posts: 2906
Location: 127.0.0.1
Thank you!

Image

_________________
aboutscriptappsscripts
Any code ⇈ above ⇈ requires AutoHotkey_L to run


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 552 posts ]  Go to page Previous  1 ... 22, 23, 24, 25, 26, 27, 28 ... 37  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: migz99 and 0 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