qwertyking Posted August 16, 2006 Posted August 16, 2006 When I run this DllCall it will pause my script until the window I opened with the DllCall closes.$dll = DllOpen("c:\progra~1\MXACSR6\p2mpi00.dll")DllCall($dll, 'none', 'sendBrowserMessage','string', "CRTOBJ OBJCLS(POR) FLDLST(ORDRPM='TEST')")DllClose($dll)Send("{ENTER}")This open the windows but does not send the {ENTER}. The function is blocked until the window is closed. I can manually hit enter on the keyboard, but it would make the script require user interaction. Once the window closes the script continues.Any help would be great. ....... Here is the Documentation from the Program.......int sendBrowserMessage(char *);Send a command to be performed by the MAPICS Client. Function will block until MAPICS Client performs requested function.Parms: String that contains the command.Returns: 0 if successful-1 if MAPICS Client is not running -2 if application is invalid (not allowed to send commands) -4 if command is incorrect (syntax or semantics)
lod3n Posted August 16, 2006 Posted August 16, 2006 Are you sure it's not sending Enter? Add this to the beginning of your script: Opt("TrayIconDebug", 1) so you can hover over the AutoIt icon, and see which line it's hung on. Adding this before the Send command msgbox(0,"","Dll call finished!") If the messagebox show up, it didn't hang on the DllCall [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]
lod3n Posted August 16, 2006 Posted August 16, 2006 Or you could trick it. Make a small EXE called WaitEnter.exe with this autoit codesleep(1000) ; wait one second send("{enter}") [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]
qwertyking Posted August 16, 2006 Author Posted August 16, 2006 I made a small exe to wait for the window to pop up and then click enter. Thats works but I will have to add like 5 different .exe for various tasks throughout the script. I am afraid that I may have to pass a variable and it would not pass to the other .exe
lod3n Posted August 16, 2006 Posted August 16, 2006 Okay, how about this. Make a second EXE who's only job is to wait for various windows that pop up and send an enter to them. Then call that exe first, and close it when you're done, like this $EMpid = run(@scriptdir & "\EnterMaster.exe") ; ;do your dllcalls, etc ; ProcessClose ($EMpid) [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]
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