PDA

View Full Version : Run without hitting enter


mint77
March 22nd, 2013, 07:28
I would like to have this program run automatically instead of having to enter enter.

I don't know what I need to change.

Could someone help me ?

Thanks

Kayaker
March 22nd, 2013, 09:51
Can you explain your question in words? Such that one doesn't need to download the file to understand what you mean? Is this something you coded yourself? Are you asking about creating an autorun entry? A verbal explanation is more likely to get a response to what on first reading is a confusing question.

mint77
March 22nd, 2013, 13:34
Sure, when the program runs, it has a NEXT box that needs to be pressed to continue.

I want it to run automatically without any user intervention.

I tried echoing Y and enter to the program, but they don't work.

bilbo
March 22nd, 2013, 13:55
Have a look at www.autoitscript.com
Best regards, bilbo

mint77
March 22nd, 2013, 14:50
Thanks. At 7 Mb, I think this can be done in assembly.

Andy

Extremist
March 22nd, 2013, 17:30
Look into SendInput() to manufacture keystrokes and mouse actions. You may need to manufacture some Tabs or whatever keystrokes are needed to put focus on the NEXT box. It might take a bit of finagling, but if you know exactly what to do via the keyboard and mouse, you can emulate that via SendInput().

mint77
March 22nd, 2013, 18:15
I found this. I need enter,tab,enter,tab, and enter but sometimes if it doesn't find any missing links, only one enter would be required. Not sure how that would be implemented.

; and now simulate keyboard entries
invoke keybd_event, VK_RETURN, NULL, NULL, NULL ; Send ENTER key
invoke Warte_Zeit, 1 ; wait 1 second
invoke keybd_event, VK_F4, NULL, NULL, NULL ; Send F4 key 'down'
invoke Warte_Zeit, 1
invoke keybd_event, VK_F4, NULL, KEYEVENTF_KEYUP, NULL ; Send F4 key 'up'
invoke Warte_Zeit, 1
invoke keybd_event, VK_F4, NULL, KEYEVENTF_KEYUP, NULL ; Send Alt key 'up'
invoke Warte_Zeit, 1
invoke SetForegroundWindow, hwndTemp ; activate own window again

disavowed
March 23rd, 2013, 11:09
Quote:
[Originally Posted by mint77;94415]Thanks. At 7 Mb, I think this can be done in assembly.

Then do it in assembly. Why are you bothering to post about this?

bilbo
March 24th, 2013, 04:34
Quote:
[Originally Posted by disavowed;94420]Then do it in assembly. Why are you bothering to post about this?

Well, I thought he was already advanced enough to do some steps by himself...

So here are all the steps I made some months ago:

(1) download autoit-v3-setup.exe (yes, it's 7 Mb)
(2) open 7zip and extract AutoItX3.dll (325 Kb)
(3) disassemble the functions you are interested in (AU3_ControlClick, AU3_Run, AU3_WinExists)
(4) rewrite them - in assembly, why not? (I preferred to convert them in "C" - yet more fun!) in order to build a simple launcher
(4 bis) alternatively, you cam build a DLL to inject in the target process...
(4 ter) alternatively, you can use the DLL as it is: it is free...

I assure you it was big fun!
Best regards, bilbo

mint77
March 24th, 2013, 07:37
Thanks Bilbo.

Andy