Dealing with icons, screen orientation, and MortScript - JASJAR, XDA Exec, MDA Pro General

I apologize in advance if this gets too technical for some, but after you read it, you may understand why I took the time to do it and ultimately offer it here.
First of all, if you noticed after a soft reset that it takes some time for Windows Mobile to show the programs you have installed on your device, you'll quickly realize that the reason why it's so slow is that it's grabbing the icon image from the shortcut's executable, which is usually located at the end of that executable.
Now, you'll also notice that some icons appear slower than others. Most of the time, it's because the program's executable is usually big. Take Skype, for example. It can take up to 20 seconds just to show the stupid S icon because the single executable is about 5MB big.
All that effort to get to an icon is painstaking, and surprisingly enough, the issue remains in Windows Mobile 5.0. Why Microsoft never learned to cache the icons in a single file is beyond me. And you'll have to deal with it after every soft or hard reset... Of course, the average user here does that often, so you can see where I start to get frustrated.
But with frustration comes inspiration (or desparation).
I have created a small 26KB file called RunSkype.exe. All it does is launch Skype. While that doesn't sound helpful much, you'll realize that if you copy this file to the Skype folder, then create a shortcut to RunSkype.exe and replace the Skype shortcut with this one, you'll see that the icon and program will show up MUCH faster than having Windows Mobile 5 try to poll the 5MB file.
I also took the liberty of making a full VGA-compatible icon for Skype, so it looks good from 16x16 pixels to 64x64 pixels.
You can download the program here: http://www.beyondthetech.com/downloads/phone/hacks/RunSkype.exe
Now, for us HTC Universal owners, you're in for a treat. A really awesome program called MortScript has been released. MortScript is essentially a batch language which you can have steps completely automated for you, based on a text file of commands you create. You can simulate button and keypresses, stylus taps and holds, execute and close programs, read/write registry entries, and much more.
http://www.sto-helit.de/modules/edito/content.php?id=38
One of the biggest gripes I have on the Universal are the developers who have not yet dealt with landscape mode. Some games such as Pocket Mini Golf 2 and Farkle, will either look nice or screwed up, and/or the stylus will not work properly because the image doesn't match the screen coordinates. Avid Universal owners will know what I'm talking about.
Using MortScript, I create this batch file:
Code:
Rotate 0
RunWait \Program Files\Smart Box Design\Farkle.exe
Rotate 270
If it isn't obvious, the batch file will rotate the display to portrait mode, then launch the program. After the program has exited, it will revert back to landscape mode. Again, Universal owners such as myself have kicked themselves for launching a program knowing they have to flip the screen before they run it in order for it to work. This batch file takes the forgetful step and makes it automatic. Flipping the screen to portrait afterwards makes no difference since it's already in portrait, so you're all good to go.
The only downsides to this are two things: 1. If the program doesn't actually exit, but minimize, then it will never get a chance to rotate back. In that case, I delete the last line of the batch file and change RunWait to just Run. 2. It's obvious that you'd make a shortcut to the batch file, not the program's executable anymore. Soon, you'll notice that all the shortcuts will have the same MortScript icon, and that just looks ugly.
This is where my second executable comes in. But, this is going to require some work and an icon editor such as MicroAngelo.
I created a program called batchrun.exe. After you have created your MortScript batch file, save it as batchrun.mscr and put both files in the program's folder. Drag the batchrun.exe and the original program's executable out to your desktop. Using MicroAngelo's Librarian software, you can extract the icon images out of the original program's executable and inject it into batchrun.exe. That way, when you create a shortcut to batchrun.exe, it will have the original icon of the program you want to run.
So, the chain of command is: batchrun.exe -> batchrun.mscr -> commands + original program's executable
One final word... batchrun.exe is hardcoded to run batchrun.mscr, so you can't change the name of the batch file. In addition, you cannot change batchrun.exe's name either, since it's tied into the programming. But you can modify its icon data all you want.
Some of the programs I have successfully done this for include:
Acodic Mobile Info2Go
Handmark Zagat to Go
Resco Diamonds
RealDice.com Texas Hold'em
Smart Box Design Farkle
EdgeQ TrafficEdge
Momentum Games Pocket Mini-Golf 2
Again, the above listed programs do not play well in landscape mode, but with the batch file commands I provided above, it makes using these programs much easier.
Here's batchrun.exe. It currently has my BeyondtheTech Guy logo, but again, use an icon editor software like MicroAngelo to replace it as needed.
http://www.beyondthetech.com/downloads/phone/hacks/batchrun.exe
Here's a bonus. I like keeping the Start Menu as clean as possible. This includes the Recent Start Menu items that appear the moment you start launching away at shortcuts. You may recall that if you never ran anything, all it said was "Recent Programs" and the Start Menu was as short and simple as possible.
Well, you can always get that fresh feeling by creating a MortScript batch file containing this line:
Code:
RegDeleteKey HKCU,\Software\Microsoft\Shell\TaskSwitch,1,1
Call this file cleanup.mscr and stick it in your \Windows\Startup folder. As soon as you boot up from a soft reset, it will silently wipe out the most recently launched items.
Hope this was helpful to anyone.
If anyone needs help or doesn't understand any of this, just let me know.

RunSkype.exe .... thanks for that
S

Related

How to change start menu colour/image on Universal?

Okay, so I've trawled the net in search of a definitive answer to this, and I know it has something to do with the tdyater image file, but I can't get mine to change.
To cover my back I decided to make the file in 3 different formats, and with 3 different names. So in my windows folder I now have:
tdywater.gif
tdywater_480_640.gif
tdywater_640_480.gif
tdywater.jpg
tdywater_480_640.jpg
tdywater_640_480.jpg
tdywater.png
tdywater_480_640.png
tdywater_640_480.png
And still the background of the start menu is just clear, with my background picture visible underneath. This isn't helpful since my background image is very busy and no font colour can make the menu clearly visible. Is there a certain size the image has to be? I'm trying to use a 640x640 image. And is there anything I need to alter in the registry to make the picture appear?
Basically I am trying to use a plain white image, so would also be happy if someone could inform me of a registry key that can change the colour of the start menu.
Thank you
Hi,
tdywater = Today screen picture
stwater = Start menu picture
My start menu picture is a darkened version of the picture I use for my today screen but you can have anything you want.
G
I have to disagree. Though that would be logical based on the file names, I have just done a little test, and my today screen background is governed by stwater_480_640.jpg (for portrait) and stwater_640_480.jpg (for landscape).
If I rename those files to tdywater, then the default windows background appears. And none of these files, be it stwater or tdywater have any effect on the start menu at all.
I sense something odd i happening with my device, since the way you said it sounds like it should be right.
But having said that, I did originally read somewhere (think it was ppcsg) that the correct filenames for portrait and landscape backgrounds were the ones I am uing, hence why I use them, and hence why they work. So basically it's just the start menu I'm struggling with.
I quote from "How to Create an Extended Theme" from Spb Pocket Plus:
http://www.spbsoftwarehouse.com/products/pocketplus/themetutorial.html?en
# Select your Today screen image (tdywater.gif) from the folder you created. Press Next.
# Select your Start menu image (stwater.gif) from the folder you created. Press Next.
These have been the standard filenames for the images for as long as I can remember...
G
gquipster said:
I quote from "How to Create an Extended Theme" from Spb Pocket Plus:
http://www.spbsoftwarehouse.com/products/pocketplus/themetutorial.html?en
# Select your Today screen image (tdywater.gif) from the folder you created. Press Next.
# Select your Start menu image (stwater.gif) from the folder you created. Press Next.
These have been the standard filenames for the images for as long as I can remember...
G
Click to expand...
Click to collapse
Well bugger the standard. If you read my posts you will see that is not the case on my device. Suppose I'll just keep trying
Are you just copying the images onto the device or using a TSK theme file?
I could never get it to work just copying the images.
This was the program which was recommended to me for building TSK files:
http://www.codeppc.com/telechargements/themegence/themegence.htm
Or do what I did for my first theme and use a CAB editor and just change the images in an existing theme
Not doubting you that it's not working on your device, just not a lot I can do but offer you the information which I have.
Hope this helps
G
Found a way round it
1. Make the theme using the standard microsoft theme generator
2. Apply it on the device
3. delete tdywater.gif
4. Insert my own tdywater_480_640.jpg and tdywater_640_480.jpg files
5. Bingo!
Only thing is, I have to re-do most of that (from step 2 onwards) every time I soft reset, because by default my universal is showing stwater as the background image (ie: a think white bar which I have as my start menu background). It only recognises tdywater after applying a theme
Just use Wisbar!! :lol:
GaZ said:
Found a way round it
1. Make the theme using the standard microsoft theme generator
2. Apply it on the device
3. delete tdywater.gif
4. Insert my own tdywater_480_640.jpg and tdywater_640_480.jpg files
5. Bingo!
Only thing is, I have to re-do most of that (from step 2 onwards) every time I soft reset, because by default my universal is showing stwater as the background image (ie: a think white bar which I have as my start menu background). It only recognises tdywater after applying a theme
Click to expand...
Click to collapse
Thanks

iphone slide2unlock ques.

hey, i just installed the iphone slide2unlock on to my htc mogul 6800. it works and everything when i open the file and click on the slide tab, but what i want to do is set it as a screen saver so that it come up everytime i power the screen off. because now what it does is it runs but when i slide unlock it it just goes back to the file i opened it from. Also, the date is correct but it always displays the wrong time, can anyone help me or give some insight on how to get it to do these things????
take a look at the readme file that's included in the slide2unlock installation directory. There are a bunch of registry entries that control the configuration of the program.
Also, make sure that 'ilock' is in your startup folder (it's installed there by default). This program must be running for the slide2unlock software to do things 'automatically'.

map programs folder to hardkey?

In HTC home plug, I can set one of the soft buttons on the launcher to "launch programs folder". Is there a way to map this function to a hardkey? I don't want to download a third party launcher--I just want to be able to press a button and open the programs folder (and not in the file explorer view).
Any help would be wonderful.
Another folder in which I could put shortcuts in would also work. I just want the icons large and finger friendly like the programs folder.
Is it possible to use folderview.exe to do this?
Check here for the solution...
http://forum.xda-developers.com/showpost.php?p=1644004&postcount=7
I used this to create a shortcut in each and every sub folder under Programs so once in a sub folder, I can easily go back to the Programs folder without having to close the window and open the Programs again from the HTC Home App.
I called the shortcut '!Back to Programs.lnk' so it appeard at the beginning of every folder and the shortcut is setup as follows...
Code:
53#\Windows\folderview.exe #?\Windows\shellres.dll,-8208
Copy the above into simple binary text editor and save to have your shortcut.
I guess you wouldn't need the '53#' and '?\Windows\shellres.dll,-8208' bits to link to hardkey. This is more to give the shortcut a nicer icon in the folder view.
Been looking for this. google search "launch programs folder" found this thread. Ought just be a 'icon view' option in file explorer dontcha think? Thanks!
Hmmm... it's not doing quite what I'm after...
As the FolderView is an application, when you click the X in the top right corner, it closes the window. If you were in the 'Start' => 'Programs' folder and were in a sub folder, pressing the OK button would simply return you to the previous folder.
I counter acted this by adding a shortcut to the FolderView app in every folder as mentioned above but for some reason this no longer works correctly. I think it has something to do with the HTC Task Manager I have upgraded to (v 2.0.30995). Works better than previous version but for this one thing, I think it's stopping multiple instances of the FolderView app.
So, this brings me to... How can you load the Programs Folder so you can go back from a sub folder?
Can anyone hack the FolderView app? A simple 'Up' button could be added to the lower left of the window, similar to the view of File Explorer. This way, the X can still be used to close the FolderView App and the 'Up' button takes you back up the Programs list.
In case your wondering, I have various apps loaded on my Pocket PC and have categorised them and placed into sub folders. I've then created an icon association to each folder so it looks a little more pleasent when viewing. However, I want to freely browse the folder. See attached Tumbnail...
the link works on sprint touch. I call it "_Up" so it always appears at first position.
I note that folderview when you close it doesn't appear in task menu like file explorer and most other app.
folderview with some options would be great because it's a fast finger friendly interface ... must faster and easier to configure than various cubes.
ps
I came across this in another thread. I haven't tried it yet but I'm gonna take a look when I get a chance.
Possibly it could be used to add some features to folderview:
http://www.angusj.com/resourcehacker/
I'm glad I stumbled across this thread because I think it's exactly what I want to do...I just need a little help as I'm not as savvy as some of you guys might be.
What I'm wanting to do is create sub directories in my programs folder like viglante_xix does (grouping Office, GPS Programs, Media Programs, etc.) and point to it as a shortcut in rlToday. I think I might have been able to figure this out on my own after tinkering, but I don't have the folderview.exe in my windows dir. Can someone send me a copy or know of an alternative?
Also, I'm not completely ignorant to programming; I know a little VB, Java, and C++. I understand how the code above works, but what program do I use to make this shortcut...preferably something free.
Thanks in advance.

Creating shortcuts which "wrap" a program with WVGAFIX3

For some time, I've been using WVGAFIX3 on my Blackstone to run older games supporting only 320x240 (QVGA) or 640x480 (VGA) resolutions.
As excellent as WVGAFIX3 is, running WVGAFIX3 "by hand" has always been annoying, especially if I forget it the first time, and copying and editing the typical Mortscript for each new game is a hassle:
Code:
RunWait("\Windows\WVGAFIX3APP.exe", "-640")
Sleep(500) # pause suggested by mr_deimos, to allow the dust to settle
RunWait("\path\to\game.EXE)
Run("\Windows\WVGAFIX3APP.exe", "-800")
These scripts have to be stored somewhere, and icons can't be assigned to them, so they're not a good alternative to the plain shortcut.
My next step was to generalize the script (called RunVGA.mscr):
Code:
RunWait("\Windows\WVGAFIX3APP.exe", "-640")
Sleep(500)
RunWait(arg1)
Run("\Windows\WVGAFIX3APP.exe", "-800")
Now, arg1 can be given at the command line in the shortcut - this example is Shift.lnk (for this free, excellent little time waster):
Code:
132#"\Windows\Mortscript.exe" "\bin\RunVGA.mscr" arg1="\Program Files\Shift\Shift.exe" ?\Program Files\Shift\Shift.exe,
(The Shift game can really mess up the Blacstone's display if WVGAFIX3 is not used - I've had to soft reset a couple of times when I forgot!)
This shortcut will look like the original, as the icon is preserved (by repeating the EXE path between "?" and ",", and providing no icon ID after ",", thus using the default ID). When launched, RunVGA script above will do its thing.
Now, the next improvement would be to simplify the shortcut (at the cost of launching an extra process). I have modified RunMscr.exe found here. When renamed to yourscript.exe, the original executes
Code:
Mortscript.exe yourscript.mscr argument1 argument2 ...
My patched version (attached) executes
Code:
Mortscript.exe yourscript.mscr arg1=argument1 arg2=argument2 ...
Notice that RunMscr.exe implicitly names the arguments, something which should have been done by Mortscript a long time ago, in my opinion. Thus, I can copy RunMscr.exe to RunVGA.exe, and modify the shortcut above to
Code:
132#"\bin\RunVGA.exe" "\Program Files\Shift\Shift.exe" ?\Program Files\Shift\Shift.exe,
(Notice that I keep all scripts and manually copied executables in \bin - adjust accordingly in the scripts provided!)
Having RunVGA.exe with my method of passing arguments, means that you can also launch an executable in VGA mode directly from Resco Explorer by using tap and hold, "Open With...", and browsing to RunVGA.exe.
Now, I was pretty happy with this, but wanted a lazy man's solution for creating these shortcuts (and reverting to the original). The following describes how to toggle a shortcut between its original version and its RunVGA version, again using "Open with..." in Resco Explorer.
First create ToggleVGAfix.mscr:
Code:
line=ReadLine(arg1)
Split(line,"#",1,length,shortcut)
Split(shortcut,"?",1,shortcut,icon)
If (Find(shortcut, "RunVGA") = 0)
# This is a normal shortcut, convert to RunVGA shortcut
If (icon eq "")
icon = shortcut
# Strip quotes from icon string
While (CharAt(icon, Length(icon)) eq """")
icon = SubStr(icon, 1, Length(icon)-1)
EndWhile
While (CharAt(icon,0) eq """")
icon = SubStr(icon, 2)
EndWhile
icon = icon & ","
EndIf
line = length & "#" & """\bin\RunVGA.exe"" " & shortcut & " ?" & icon
Else
# This is a RunVGA shortcut, revert to original
Split(shortcut,"RunVGA.exe"" ",1,dummy,target)
line = length & "#" & target
EndIf
# Uncommment if you want to keep the original
#Rename(arg1, arg1 & ".bak", TRUE)
WriteFile(arg1, line)
Next, copy RunMscr.exe to ToggleVGAfix.exe (next to the ToggleVGAfix.mscr script above).
In Resco Explorer, navigate to a shortcut you want to test this on, tap and hold, select Open With, and browse to ToggleVGAfix.exe. Then try launching the shortcut itself - if all goes well, the program will run in VGA mode, and revert back to WVGA when ended.
With all this behind us, we've accomplished this: The next time you install a QVGA/VGA game, navigate to the \Windows\Start Menu\Programs\Games (according to your locale) folder, tap and hold the shortcut, select ToggleVGAfix, and you should be good to go from your normal Games menu.
A small caveat: I've noticed that WVGAFIX3 occasionally doesn't kick into effect in time for the "wrapped" exe. I may look into this if it proves to be enough of a problem. Edit: added a Sleep which fixed this problem for mr_deimos.
great job! I wish wvga worked on wm 6.5 so I could use this with wvga
this can be useful with other programs tho too, do you think i can use this to disable windows mobile's setting temporarily while certain programs are running? I'm having a problem with an music player going into sleep mode while I'm playing a song but I don't want to disable windows mobile sleep completely cause it saves so much battery life.
also is it possible to use this to run a program automatically in the background by ridirecting to the today screen right after running the program?
Nice job. Believe me or not, but i made a script identical to the first one you posted a week ago - just for launching Shift on my wvag toshiba g900 But i just put the shortcut to mscr file in the start menu - you actually can change it's icon so it was good enough for me.
My shortcut is:
Code:
104#"\Storage Card\Program Files\Games\Shift\Shift.mscr"?\Storage Card\Program Files\Games\Shift\Shift.exe,0
But of course, your automagic solution for toggling wvgafix is much better than doing everything by hand
Just a little note - you might want to add a Sleep(500) or even Sleep(1000) before running the app itself. Just using the RunWait to launch wvgafix usually works, but today when i launched shift with script without Sleep() the game actually started before wvgafix finished resizing the screen. So all i got was a black screen. I could close shift by tapping in the top-right corner of the screen, but taskbar remained hidden and i had to soft-reset to get it back. It happened twice in a row. It's seems to be the same problem you're facing. In my case it was probably caused by the fact that my pda is running underclocked a bit (when i was first testing the script it was running at full speed). After putting in the additional 1-second sleep everything works like a charm And the difference in startup time isn't really noticeable.
CowMix said:
great job! I wish wvga worked on wm 6.5 so I could use this with wvga
Click to expand...
Click to collapse
Yes, this is one of the reasons I'm postponing 6.5. (The other, of course, is that kwbr has not yet released a Topix based on 6.5 )
this can be useful with other programs tho too, do you think i can use this to disable windows mobile's setting temporarily while certain programs are running? I'm having a problem with an music player going into sleep mode while I'm playing a song but I don't want to disable windows mobile sleep completely cause it saves so much battery life.
Click to expand...
Click to collapse
Unless your player has the option to disable sleep, modifying my script(s) will probably work fine. Simply replace the Run statements for WVGAFIX3 with whatever executables or registry changes you want to happen. For registry changes, you may want the safeguard of resetting the "standard" values at startup, in case your phone resets or turns off while your player (and the script) is running.
also is it possible to use this to run a program automatically in the background by ridirecting to the today screen right after running the program?
Click to expand...
Click to collapse
Probably! Replace the code in the first script with something like this (untested):
Code:
Run(arg1)
Sleep(1000)
Show("Start")
A different take:
Code:
Run(arg1)
title = "Title of window to hide"
WaitFor(title, 30)
Minimize(title)
This will need more work to use with my shortcuts, as this script also needs the title of the window to hide. The benefit is that Windows will show the previously active window instead of Today, which is usually what you want.
mr_deimos said:
Nice job. Believe me or not, but i made a script identical to the first one you posted a week ago - just for launching Shift on my wvag toshiba g900
Click to expand...
Click to collapse
I think many of us have done a similar job with Shift .
But i just put the shortcut to mscr file in the start menu - you actually can change it's icon so it was good enough for me.
Click to expand...
Click to collapse
That works - I would have preferred to put the mscr directly into the Start menu (to avoid having to stash them somewhere else). In this case the icon is determined by the mscr extension, which looks dull, to say the least .
Code:
104#"\Storage Card\Program Files\Games\Shift\Shift.mscr"?\Storage Card\Program Files\Games\Shift\Shift.exe,0
Is 0 the icon ID, or just the "default" icon? I simply tried with nothing after the comma, and it seemed to pick up the default icon in each EXE/DLL.
But of course, your automagic solution for toggling wvgafix is much better than doing everything by hand
Click to expand...
Click to collapse
Thanks - it's something I've been meaning to figure our for at least 6 months, since I learned that WVGAFIX3 takes command line parameters.
Just a little note - you might want to add a Sleep(500) or even Sleep(1000) before running the app itself. ...
Click to expand...
Click to collapse
Thanks - added!
ugumba said:
Is 0 the icon ID, or just the "default" icon? I simply tried with nothing after the comma, and it seemed to pick up the default icon in each EXE/DLL.
Click to expand...
Click to collapse
It seems the default icon ID - the one displayed by the OS. I didn't even know you can just omit this parameter So probably both ways will give the same results.
Great thing! I tried and it works! But I have another problem. I am using Fingerkeyboard and when I switch the resolution to VGA it is still showing me error that this resolution is not supported (there is download for each resolution and it is not possible to have WWGA and VGA installed).
So my question is - it is possible to change software keyboard by Mortscript? And then, when application ends change it back?
Thank you
I found the solution, I am switching the keyboards with this tool from Vijay555: http://forum.xda-developers.com/showthread.php?t=242503
Great thing, so now I don't have to remember to change keyboard, change screen...
ugumba said:
For some time, I've been using WVGAFIX3 on my
In Resco Explorer, navigate to a shortcut you want to test this on, tap and hold, select Open With, and browse to ToggleVGAfix.exe.
Click to expand...
Click to collapse
It seems that you don't need the non-freeware resco explorer for that - the file explorer extension from here:
http://forum.xda-developers.com/showthread.php?t=421723
also provides this functionality. You would just need to make sure that the shortcut to ToggleVGAFix.exe is in the start menu (the file explorer extension can't browse for program to open file with).
ugumba said:
For some time, I've been using WVGAFIX3 on my Blackstone to run older games supporting only 320x240 (QVGA) or 640x480 (VGA) resolutions.
As excellent as WVGAFIX3 is, running WVGAFIX3 "by hand" has always been annoying, especially if I forget it the first time, and copying and editing the typical Mortscript for each new game is a hassle:
Code:
RunWait("\Windows\WVGAFIX3APP.exe", "-640")
Sleep(500) # pause suggested by mr_deimos, to allow the dust to settle
RunWait("\path\to\game.EXE)
Run("\Windows\WVGAFIX3APP.exe", "-800")
These scripts have to be stored somewhere, and icons can't be assigned to them, so they're not a good alternative to the plain shortcut.
My next step was to generalize the script (called RunVGA.mscr):
Code:
RunWait("\Windows\WVGAFIX3APP.exe", "-640")
Sleep(500)
RunWait(arg1)
Run("\Windows\WVGAFIX3APP.exe", "-800")
Now, arg1 can be given at the command line in the shortcut - this example is Shift.lnk (for this free, excellent little time waster):
Code:
132#"\Windows\Mortscript.exe" "\bin\RunVGA.mscr" arg1="\Program Files\Shift\Shift.exe" ?\Program Files\Shift\Shift.exe,
(The Shift game can really mess up the Blacstone's display if WVGAFIX3 is not used - I've had to soft reset a couple of times when I forgot!)
This shortcut will look like the original, as the icon is preserved (by repeating the EXE path between "?" and ",", and providing no icon ID after ",", thus using the default ID). When launched, RunVGA script above will do its thing.
Now, the next improvement would be to simplify the shortcut (at the cost of launching an extra process). I have modified RunMscr.exe found here. When renamed to yourscript.exe, the original executes
Code:
Mortscript.exe yourscript.mscr argument1 argument2 ...
My patched version (attached) executes
Code:
Mortscript.exe yourscript.mscr arg1=argument1 arg2=argument2 ...
Notice that RunMscr.exe implicitly names the arguments, something which should have been done by Mortscript a long time ago, in my opinion. Thus, I can copy RunMscr.exe to RunVGA.exe, and modify the shortcut above to
Code:
132#"\bin\RunVGA.exe" "\Program Files\Shift\Shift.exe" ?\Program Files\Shift\Shift.exe,
(Notice that I keep all scripts and manually copied executables in \bin - adjust accordingly in the scripts provided!)
Having RunVGA.exe with my method of passing arguments, means that you can also launch an executable in VGA mode directly from Resco Explorer by using tap and hold, "Open With...", and browsing to RunVGA.exe.
Now, I was pretty happy with this, but wanted a lazy man's solution for creating these shortcuts (and reverting to the original). The following describes how to toggle a shortcut between its original version and its RunVGA version, again using "Open with..." in Resco Explorer.
First create ToggleVGAfix.mscr:
Code:
line=ReadLine(arg1)
Split(line,"#",1,length,shortcut)
Split(shortcut,"?",1,shortcut,icon)
If (Find(shortcut, "RunVGA") = 0)
# This is a normal shortcut, convert to RunVGA shortcut
If (icon eq "")
icon = shortcut
# Strip quotes from icon string
While (CharAt(icon, Length(icon)) eq """")
icon = SubStr(icon, 1, Length(icon)-1)
EndWhile
While (CharAt(icon,0) eq """")
icon = SubStr(icon, 2)
EndWhile
icon = icon & ","
EndIf
line = length & "#" & """\bin\RunVGA.exe"" " & shortcut & " ?" & icon
Else
# This is a RunVGA shortcut, revert to original
Split(shortcut,"RunVGA.exe"" ",1,dummy,target)
line = length & "#" & target
EndIf
# Uncommment if you want to keep the original
#Rename(arg1, arg1 & ".bak", TRUE)
WriteFile(arg1, line)
Next, copy RunMscr.exe to ToggleVGAfix.exe (next to the ToggleVGAfix.mscr script above).
In Resco Explorer, navigate to a shortcut you want to test this on, tap and hold, select Open With, and browse to ToggleVGAfix.exe. Then try launching the shortcut itself - if all goes well, the program will run in VGA mode, and revert back to WVGA when ended.
With all this behind us, we've accomplished this: The next time you install a QVGA/VGA game, navigate to the \Windows\Start Menu\Programs\Games (according to your locale) folder, tap and hold the shortcut, select ToggleVGAfix, and you should be good to go from your normal Games menu.
A small caveat: I've noticed that WVGAFIX3 occasionally doesn't kick into effect in time for the "wrapped" exe. I may look into this if it proves to be enough of a problem. Edit: added a Sleep which fixed this problem for mr_deimos.
Click to expand...
Click to collapse
Hi, sounds really great. but i have problems to understand...
which files do i need and where i have to place them?
do i need for every game a own file?
greetings
Clearly, getting this setup on your device is left as an exercise for the reader! I basically did this for myself, but wanted to share something I found useful, and explain how I got there. Maybe if there's enough interest, I'll try making a CAB.
I'll try to clarify a bit, though:
1. You need Mortscript installed (I use 4.2 which comes with SASHIMI)
2. You need WVGAFIX3 installed.
3. You need 2 scripts copied from my first post, named RunVGA.mscr and ToggleVGAfix.mscr. If you already have a folder for your personal scripts collection (I use \Storage Card\bin), I suggest you put them there.
4. You need my version of runmscr.exe, attached to my first post, copied to your scripts folder as RunVGA.exe and ToggleVGAfix.exe.
5. You need a file explorer capable of handling alternate associations, so that you can register the two executables as "handlers" for the .lnk extension. On my device, Resco Explorer is indispensable.
6. Finally (the hard part) you need to loosely follow and understand the instructions in the first post, and adjust them to your situation when needed. The important part is after the ToggleVGAfix code (2 paragraphs).
Except for editing ToggleVGAfix.mscr according to your scripts folder, you should never have to edit a file, understand the .lnk format or really understand Mortscript. (All my talk around the Shift shortcut is just me being long winded and feeling I have to explain everything. See how this "little" post turned out? )
If this seems mystical or unclear, I suggest reading the Mortscript manual - you'll be happy you did. Also, Barbudor's page on the original runmscr might shed some light on my rants.
Hey, sorry for jumping on after the horse has bolted, I've been dead for a while, but it's better now...
There's another version of SipSwitch out, called VJSipSwitch (I think).
Don't use the old one, because although functional, I wrote it when I didn't know how to code, akin to a thousand monkeys = Shakespeare.
V

[APP] Control Panel Settings to Links (.lnk)

Hi guys,
I know it's a 10 seconds job to create a link for items inside the control panel (settings) such as "Usb to PC" or "Power" but I'm too lazy to do it every time I try a new rom,
also I found some of the values change from rom to rom, so I create a really simple app that goes through the registry key which holds the settings items (KLM\Security\Shell\StartInfo\Start) and creates a .lnk file for each of these entries.
Having a direct link allows me to add that option as a quick link which is handy 8)
Anyway, here is the tool in case someone wants it.
The exe must be installed in "\Program Files\CplLinks" (Device). It only takes 11.5 kb. The only reason the .exe is needed after the lnk are created is to provide an icon.
When you run it, it reads the HKEY mention above and creates .lnk for each item in the "Settings" menu. The lnks are created in "\Windows\Start Menu\Programs\CplLinks" so are directly accessible through the Programs menu.
There are no messages, it runs and creates the links, no interaction whatsoever so do not expect any nice popup window 8)
Next version will use specific icons for each item, right now, all the links use the same icon from the cpllink.exe executable.
The icons for most of the Settings are .png files rather than .ico, and WM doesn't have an easy way to convert from .png into .ico, the idea for a "future version" is to collect all the .png files,converted to icons and create a dll on the fly with the icons as resources, so they can be referenced from the .lnk files
Couple of screen shots from the emulator.
Great application! It works like a charm! Thank you for this convenient time saver
EDiT (another time saver)
After applying a Hard Reset WE have to reinstall all programs if you have previously installed them in the memory card. Often it is sufficient to recreate the shortcut in the start menu. ShortCutCreator helps you to recover the exe files and to recreate the desired shortcut.
Thanks for sharing!
I guess would be better if I manage to provide a different icon for each link, but Icon support is quite limited inside VM. Need to work in the PNG to Icon -> .dll routine 8)
I though having the app in internal memory was a better solution than in \Storage Card, so it will take less time to load the icon from the program, but I can change it and allow that option, so the icons in the links are pointing to \Storage.. rather than \Programs..
Anyway, it just a time-saver thingy 8)
Nice app. It does not seem to work on WM6.1 though.
It does create a new folder structure: CplLinks\System inside the Start Menu.
Very nice. It does seems to create a bunch of redundant or non-used links though
Yep, I saw it only works on WM6.5, on WM6.1 there are no "StartInfo\Start" in the "KLM\Security\Shell\". Not sure where it keeps that info, maybe somewhere else in the registry.
I finally managed to convert PNG to ICO, so I think next version would allow you to choose which items you want to create links for rather than just dump everything 8)
dubidu said:
Yep, I saw it only works on WM6.5, on WM6.1 there are no "StartInfo\Start" in the "KLM\Security\Shell\". Not sure where it keeps that info, maybe somewhere else in the registry.
I finally managed to convert PNG to ICO, so I think next version would allow you to choose which items you want to create links for rather than just dump everything 8)
Click to expand...
Click to collapse
WM6.1 control panel is "HKLM\ControlPanel" if I remember correctly. There will be numbers for the mycpl stuff and words for some other control panel items like backlight, etc.
I think this post got lost in the last database disaster 8)
I wrote a new version of this tool that now gives you the icons for the control panel settings, check it out here:
http://forum.xda-developers.com/showthread.php?t=791682

Categories

Resources