torels Posted June 29, 2009 Share Posted June 29, 2009 Hi there I wanted to know if anyone knows how to return a value from an exe. Like a DllCall. Is this even possible... and if yes is it in AutoIt ? I think it could be done by writing data to some predefined memory address and then read them so to get a $DllCallVar[0] kind of thing where the exe writing the data is the dll. And the one reading is the DllCall function. But this is very risky. any other ideas on how to make it less risky OR by using any other method ? thanks for your help Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org Link to comment Share on other sites More sharing options...
monoceres Posted June 29, 2009 Share Posted June 29, 2009 Eh? Like this? Exit 1234 Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
Mat Posted June 29, 2009 Share Posted June 29, 2009 KK, using stdout. means you need to write the exe to return using consoleWrite.ExeCall.zipContains an example, which just has:ConsoleWrite ("Success")If You unzip and run ExeCall.au3, you should get a msgBox saying "Success".MDiesel AutoIt Project Listing Link to comment Share on other sites More sharing options...
Juvigy Posted June 29, 2009 Share Posted June 29, 2009 Or the other method is to write in a file or in the registry. Link to comment Share on other sites More sharing options...
torels Posted June 29, 2009 Author Share Posted June 29, 2009 thanks to everyone writing to a file or the registry was not in my options... I wanted it to be in the memory. btw... what's Exit 1234 ??? Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org Link to comment Share on other sites More sharing options...
Mat Posted June 29, 2009 Share Posted June 29, 2009 When exit a program, an exit code is sent to the os. if 0 it is a natural exit, else it defines the exit code. Within autoit, if you have defined the exit function it can be got by @ExitMethod, and describes simply why the script is exiting. For dos it is something like %ERRORLEVEL%. Read up on exit, I think what monoceres meant is that you can then read this exit code, but I'm not sure how. MDiesel AutoIt Project Listing Link to comment Share on other sites More sharing options...
monoceres Posted June 29, 2009 Share Posted June 29, 2009 Read up on exit, I think what monoceres meant is that you can then read this exit code, but I'm not sure how.It's done with the GetExitCodeProcess or using the built in autoit function runwait. Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now