Trying to make MSReader portable

Discuss anything related to JauntePE, the utlimate utility to help you tame non-portable applications. Share your experience about the apps that work with JauntePE, and the apps that don't.
Message
Author
User avatar
Kranor
Posts: 120
Joined: Sun Jan 14, 2007 7:15 am
Location: uk

#16 Post by Kranor »

Ah ok,1 problem, I've never played with autoit before, ah well yet another vertical learning curve for me to start on. :P

Chris
Posts: 106
Joined: Sun Dec 03, 2006 10:08 am

#17 Post by Chris »

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.

User avatar
Kranor
Posts: 120
Joined: Sun Jan 14, 2007 7:15 am
Location: uk

#18 Post by Kranor »

doh work pc has blocked the download.....Proves why i love portables lol

User avatar
Kranor
Posts: 120
Joined: Sun Jan 14, 2007 7:15 am
Location: uk

#19 Post by Kranor »

CAn anyone post up this bit of code as my work pc Doesn't like it and my version by using this

Code: Select all

; Script Start - Add your code below here
$ms =("Microsoft Reader")
run ("msreader_portable.exe")
WinSetState($ms,"",@SW_SHOW)
in Autoit Does not work lol

User avatar
Kranor
Posts: 120
Joined: Sun Jan 14, 2007 7:15 am
Location: uk

#20 Post by Kranor »

Probably a little clunky but got there in the end with this

Code: Select all

run ("msreader_portable.exe")
WinWaitActive("[TITLE:Microsoft Reader; CLASS:EBOOK_FRAME]")
WinSetState("[TITLE:Microsoft Reader; CLASS:EBOOK_FRAME]","",@SW_SHOW)
Feel free to correct this

Chris
Posts: 106
Joined: Sun Dec 03, 2006 10:08 am

#21 Post by Chris »

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:

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
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.

User avatar
Kranor
Posts: 120
Joined: Sun Jan 14, 2007 7:15 am
Location: uk

#22 Post by Kranor »

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. :D. 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. :D

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.

Chris
Posts: 106
Joined: Sun Dec 03, 2006 10:08 am

#23 Post by Chris »

I think it was just due to you not having a class.
Yes, you did add class and it worked like you said. But using only window title, should work just fine too.
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.

crownixx
Posts: 403
Joined: Sat May 12, 2007 6:26 am

#24 Post by crownixx »

Chris wrote:I hope crownixx would test it to get third result, just to know.
little late reply coz i was buzy setup vista in my laptop for jpe testing..
nway, i i tested both script and both of them are working to me..

Chris
Posts: 106
Joined: Sun Dec 03, 2006 10:08 am

#25 Post by Chris »

i tested both script and both of them are working to me..
Hmm... strange how it can give different results on different PCs. Thanks for testing it, crownixx.

Post Reply