Trying to make MSReader portable
Try this to unhide the msreader's window. http://mihd.net/fmhwlr
It's just a simple launcher created using AutoIt that would unhide the window. Copy the launcher in the directory of msreader_portable.exe.
It's just a simple launcher created using AutoIt that would unhide the window. Copy the launcher in the directory of msreader_portable.exe.
CAn anyone post up this bit of code as my work pc Doesn't like it and my version by using this
in Autoit Does not work lol
Code: Select all
; Script Start - Add your code below here
$ms =("Microsoft Reader")
run ("msreader_portable.exe")
WinSetState($ms,"",@SW_SHOW)
Probably a little clunky but got there in the end with this
Feel free to correct this
Code: Select all
run ("msreader_portable.exe")
WinWaitActive("[TITLE:Microsoft Reader; CLASS:EBOOK_FRAME]")
WinSetState("[TITLE:Microsoft Reader; CLASS:EBOOK_FRAME]","",@SW_SHOW)
Kranor, is my script not working on you?
I tested it and it worked okay, could you tell me what Windows OS are you using?
Or maybe the title is changed, could it be that you use it for the shell open?
I think your script could be too fast before it really unhides the window on some cases.
Running the app -> wait till the window active -> unhide, could make the script to unhide & exit before it really unhides the window, as the window hides after some time upon start.
Here is mine:
Basically the script would loop to check the msreader's window state. If the msreader is hidden, then the script will unhide it and exit. So basically, the script won't exit unless it unhides the window.
I tested it and it worked okay, could you tell me what Windows OS are you using?
Or maybe the title is changed, could it be that you use it for the shell open?
I think your script could be too fast before it really unhides the window on some cases.
Running the app -> wait till the window active -> unhide, could make the script to unhide & exit before it really unhides the window, as the window hides after some time upon start.
Here is mine:
Code: Select all
run("msreader_portable.exe")
Dim $Done
While Not $Done
Sleep(20)
$state = WinGetState("Microsoft Reader")
If $state = 5 Then
WinSetState("Microsoft Reader","",@SW_SHOW)
$Done = 1
EndIf
WEnd
Hi chris
I could not access your script because I was at work and that hosting site is blocked by my work proxy. Because of that i had to go it alone and start learning Autoit, so that was actually my first script. . Also when i tried your script it did not work for me, possibly due to my setup. I think it was just due to you not having a class as well as a window title on the WinSetState and the WinWaitActive. when I added the class to your script it ran fine with my setup. I have run my script about 60 times so far and as yet it has not turned around and bit me so i think I will stick with my script for now until it bites me then i will swap to yours.
Well after everyones hard work i think we can say that we have cracked it and now have a portable wrapper for MSReader. By the looks of it that has been the toughest build so far for JPE.When I get home tonight I think I will post it to the forum with credit to all in the right places.
I could not access your script because I was at work and that hosting site is blocked by my work proxy. Because of that i had to go it alone and start learning Autoit, so that was actually my first script. . Also when i tried your script it did not work for me, possibly due to my setup. I think it was just due to you not having a class as well as a window title on the WinSetState and the WinWaitActive. when I added the class to your script it ran fine with my setup. I have run my script about 60 times so far and as yet it has not turned around and bit me so i think I will stick with my script for now until it bites me then i will swap to yours.
Well after everyones hard work i think we can say that we have cracked it and now have a portable wrapper for MSReader. By the looks of it that has been the toughest build so far for JPE.When I get home tonight I think I will post it to the forum with credit to all in the right places.
Yes, you did add class and it worked like you said. But using only window title, should work just fine too.I think it was just due to you not having a class.
I tested your second script, it would just run JPEized msreader. So, I wonder what makes AutoIt not behave the same for different PC, my only guess is only the speed of processing. I hope crownixx would test it to get third result, just to know.