Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

IronAHK (alpha): cross platform .NET rewrite of AutoHotkey


  • Please log in to reply
581 replies to this topic
IsNull
  • Moderators
  • 990 posts
  • Last active: May 15 2014 11:56 AM
  • Joined: 10 May 2007
I'm quite not sure what the problem is, as it should work under Mono.

Posted Image
IA under Ubuntu runned from MonoDevelop

cakruege
  • Members
  • 11 posts
  • Last active: May 06 2011 10:59 AM
  • Joined: 08 Feb 2009
runas didn't work

I get this error
Could not execute: Diesem Objekt ist kein Prozess zugeordnet.
(this object has no process)

IsNull
  • Moderators
  • 990 posts
  • Last active: May 15 2014 11:56 AM
  • Joined: 10 May 2007

runas didn't work

I get this error
Could not execute: Diesem Objekt ist kein Prozess zugeordnet.
(this object has no process)

<german>
Sorry aber das macht keinen Sinn :?

RunAs setzt berechtigungen, führt aber selber nichts aus. Dieser Fehler kommt sicher nicht von einem RunAs Command, sondern wenn ein Run auf eine Datei ausgeführt wird, deren Endung dem OS nicht bekannt ist.
</german>

Please post your Source that we can reproduce the exception. Thanks ;)

EDIT:

Ah I got it by myself:
RunAs, User, 1234
Run, C:\test.txt


cakruege
  • Members
  • 11 posts
  • Last active: May 06 2011 10:59 AM
  • Joined: 08 Feb 2009

Run, C:\Windows\system32\cmd.EXE

This works with IronAHK, a cmd opens.

RunAs, myUsername, myPassword
Run, C:\Windows\system32\cmd.EXE

This results in above error message.

Same script works with original Autohotkey

IsNull
  • Moderators
  • 990 posts
  • Last active: May 15 2014 11:56 AM
  • Joined: 10 May 2007
Well I found the error and fixed it in my branch :)

The problem was, that IA uses UseShellExecute = true by default. This is not allowed when User/Pass are given, so I had to disable it after StartInfo is configured:

            if(prc.StartInfo.UserName != null || prc.StartInfo.Domain != null) {
                prc.StartInfo.UseShellExecute = false;
            }

Fix: Fixed Run when user/pass is set by RunAs

Edit: Fixed Code

cakruege
  • Members
  • 11 posts
  • Last active: May 06 2011 10:59 AM
  • Joined: 08 Feb 2009

Well I found the error and fixed it in my branch :)


Did you release binaries?

            if(prc.StartInfo.UserName != null || prc.StartInfo.UserName != null) {
                prc.StartInfo.UseShellExecute = false;
            }


That makes no sense.
Do you mean something like
prc.StartInfo.UserName != null || prc.StartInfo.Domain != null
?

IsNull
  • Moderators
  • 990 posts
  • Last active: May 15 2014 11:56 AM
  • Joined: 10 May 2007

That makes no sense.

Indeed! :lol: Holy crap.

Did you release binaries?

Well, actually the development cycle is kind of first merging foregin forks (like mine) into the main branch of Poly and then he releases binaries.

But if you like I can provide a Nightbuild of my current branch. There are many of non merged fixes & new features like Input/KeyWait Command, and some testing would be apreciated :)

cakruege
  • Members
  • 11 posts
  • Last active: May 06 2011 10:59 AM
  • Joined: 08 Feb 2009

Well, actually the development cycle is kind of first merging foregin forks (like mine) into the main branch of Poly and then he releases binaries.


ok, found IronAHK only accidently and didn't look through the hole thread.

But if you like I can provide a Nightbuild of my current branch. There are many of non merged fixes & new features like Input/KeyWait Command, and some testing would be apreciated :)


Yeah, would be nice.

IsNull
  • Moderators
  • 990 posts
  • Last active: May 15 2014 11:56 AM
  • Joined: 10 May 2007
I've created a minimal DL page for my current builds:
<!-- m -->http://dl.securityvi....ch/IronAHK/bin<!-- m -->

cakruege
  • Members
  • 11 posts
  • Last active: May 06 2011 10:59 AM
  • Joined: 08 Feb 2009

I've created a minimal DL page for my current builds:
<!-- m -->http://dl.securityvi....ch/IronAHK/bin<!-- m -->


Works, but found another bug :-)

Run, ""c:\windows\system32\cmd.exe""
If you run it directly from IronAHK it gives correct error, else it crashes.
Would be nice if compiled exe reports the exception same way like interpreted version.

IsNull
  • Moderators
  • 990 posts
  • Last active: May 15 2014 11:56 AM
  • Joined: 10 May 2007
In fact, it crashes both way (if you run it directly it just shows you the last exception in the command prompt) - what was not expected. The crash comes from the fact that process.ID is accessed without any try-catch, and the ID property isn't accessible when the Program didn't run correctly, so I fixed that.

Meanwhile, I've found another strange behavior:

msgbox %errorlevel% ;--> didn't work (errorlevel can't be looked up)
msgbox % errorlevel   ; --> returns correct errorlevel
Just in Expression Mode, errorlevel is resolved correctly, so I'll try to fix that too.

Edit:
The lookup from Errorlevel failed because it was assumed that reserved Properties have a Prefix of A_, so Errorlevel wasn't found. I removed that check now.

ahklerner
  • Members
  • 1386 posts
  • Last active: Oct 08 2014 10:29 AM
  • Joined: 26 Jun 2006
ironahk.net is no longer working
Posted Image
ʞɔпɟ əɥʇ ʇɐɥʍ

  • Guests
  • Last active:
  • Joined: --
Seems to be OKay now.

dmatch

ahklerner
  • Members
  • 1386 posts
  • Last active: Oct 08 2014 10:29 AM
  • Joined: 26 Jun 2006
yes thanks!
Posted Image
ʞɔпɟ əɥʇ ʇɐɥʍ

GDur
  • Members
  • 82 posts
  • Last active: Feb 05 2012 09:08 PM
  • Joined: 15 Nov 2009
someone told me that IronAhk won't support OOP.
That's very disappointing imo =(

IronAHK in an OOP way would be perfect.

please tell me that the information was wrong! pleeeeease! =P
*can't live without AHK*