Strange behaviour launching ext app, please help

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
rinox
Posts: 15
Joined: 09 Jun 2013 15:37

Strange behaviour launching ext app, please help

Post 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

Marco
Posts: 2354
Joined: 27 Jun 2011 15:20

Re: Strange behaviour launching ext app, please help

Post by Marco »

Can you run the script step-by-step and report us (if any) the error message?
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

rinox
Posts: 15
Joined: 09 Jun 2013 15:37

Re: Strange behaviour launching ext app, please help

Post 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
Last edited by rinox on 09 Jun 2013 17:27, edited 1 time in total.

Marco
Posts: 2354
Joined: 27 Jun 2011 15:20

Re: Strange behaviour launching ext app, please help

Post by Marco »

rinox wrote:Marco..... Italian name
Acute observation :mrgreen:

Try this

Code: Select all

run """<xypath>\Player\Thumbnailer.exe""";
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

rinox
Posts: 15
Joined: 09 Jun 2013 15:37

Re: Strange behaviour launching ext app, please help

Post 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:

binocular222
Posts: 1424
Joined: 04 Nov 2008 05:35
Location: Win11, Win10, 100% Scaling

Re: Strange behaviour launching ext app, please help

Post 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
To see the attached files, you need to log into the forum.
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

rinox
Posts: 15
Joined: 09 Jun 2013 15:37

Re: Strange behaviour launching ext app, please help

Post by rinox »

Thank you a looooooooottttttt, :appl: :appl: :appl: :appl: :appl: :appl: :appl: :appl: :appl: :appl: :appl:

Post Reply