Page 1 of 1

Strange behaviour launching ext app, please help

Posted: 09 Jun 2013 17:04
by rinox
I've made a little Autohotkey script compiled to exe to command a player (MPC-BE) to make a thumbnail list of a selected movie file.
It work ok executing it outside XYplorer but, running it from a personalized toolbar button or thru User commands, it doesn' t work.
The real thing.....
I associated the multimedia extensions to open thru a batch (DOS) file..... (it launch a media file in the player and create a file named nowplaying.loc containing the full path of the actual playing file... simple but work ok), the code:

Code: Select all

@ECHO OFF
SET EXEFOLDER=%~dp0
SET LOCATION=%~f1
start %~dp0\mpc-be.exe "%LOCATION%"
echo %LOCATION%.jpg>%EXEFOLDER%\nowplaying.loc
EXIT
To abtain thumbs from playing file, I execute this compiled Autohotkey code:

Code: Select all

#NoTrayIcon
#NoEnv
IfWinNotExist, ahk_class MPC-BE
Exit
FileRead, Clipboard, nowplaying.loc
WinActivate, ahk_class MPC-BE
SendRaw {Space}
WinMenuSelectItem, ahk_class MPC-BE,, File, Save Thumbnails...
WinWait, ahk_class #32770
WinActivate, ahk_class #32770
ControlClick, Edit1,,,,,
Send ^v
SetKeyDelay, 20
Send {Tab 2}
Send {Enter}
WinActivate, ahk_class MPC-BE
Send {space}
FileSetAttrib, -R, nowplaying.loc
FileDelete, nowplaying.loc
Exit
If I execute this code, simply fisically launching that compiled code, it work OK, it check if player is running, if it run create an image file containg the thumbs of the playing file.

THE PROBLEM: I made a shortcut to the exe, using a personalized button with this code:

Code: Select all

run "<xypath>\Player\Thumbnailer.exe";
, I also used a previous managed User command, both doesn' t worked.
I spend some time to read the user manual and searching in this forum, but I didn' t found anything that helped me.

THE QUESTION: How can I resolve, this problem? How work the WYplorer scripting engine? There' s something I can do? My actual platform is windows 8 pro 32bit modded to run with 8 GB ram, but this problem occour even on Win7 64bit and Win8 64bit...... I don't think the problem is the OS.....thank you in advantage.

Dott. Ing. Sandro Stacchiotti

Re: Strange behaviour launching ext app, please help

Posted: 09 Jun 2013 17:15
by Marco
Can you run the script step-by-step and report us (if any) the error message?

Re: Strange behaviour launching ext app, please help

Posted: 09 Jun 2013 17:20
by rinox
the only step XYplorer must do: run "<xypath>\Player\Thumbnailer.exe";
If I execute Thumbnailer.exe directly it work ok.
XYplorer don' t report error

Marco..... Italian name

Re: Strange behaviour launching ext app, please help

Posted: 09 Jun 2013 17:26
by Marco
rinox wrote:Marco..... Italian name
Acute observation :mrgreen:

Try this

Code: Select all

run """<xypath>\Player\Thumbnailer.exe""";

Re: Strange behaviour launching ext app, please help

Posted: 09 Jun 2013 17:31
by rinox
Marco wrote:
rinox wrote:Marco..... Italian name
Acute observation :mrgreen:

Try this

Code: Select all

run """<xypath>\Player\Thumbnailer.exe""";
No way , it doesn't work :veryconfused:

Re: Strange behaviour launching ext app, please help

Posted: 09 Jun 2013 18:20
by binocular222
Use this Autohotkey script:

Code: Select all

SendMessage,0x0111,808,,,ahk_class MPC-BE
All done, no need for .loc file, no need for MPC to be active....
P.S:
You can control MPC by SendMessage.
For the list of message to be sent, refer to attached file

Re: Strange behaviour launching ext app, please help

Posted: 09 Jun 2013 20:52
by rinox
Thank you a looooooooottttttt, :appl: :appl: :appl: :appl: :appl: :appl: :appl: :appl: :appl: :appl: :appl: