HardKeyMenu v.3.2 - Windows Mobile Development and Hacking General

Hi all,
i would like to share with you a utility i have written to help me with my PDA.
Mainly (as the name says), with this utility different programs can be started by using the keys of the PDA.
Its like an extension of the hotkeys but without impacting the hotkey usage.
I have included one more utility which i use together with the hardkeymenu called cscommandline.
Information is included in the cscommandline-spec.txt.
This utility can turn on/off the bluetooth, set the global volume to a value, set the ringer volume to a value,
set the ringer script to a value (this enables the vibration during the alert of calls etc).
I have tested it on a TyTn with WM6 but it should work under WM5 as well.
Link for the whole package is at:
http://rapidshare.com/files/84951586/hardkeymenuv32.zip
>>>>>>>>>>>>>HARDKEYMENU
Usage
-----
Hardkeymenu extends the usage of hot keys:
Its possible now to assign any program (.exe) or registered file to be executed with a
combination of user defined key strokes.
It provides feedback (picture/sound/vibrates) of the options selected.
The program works as follows:
Once the hardkeymenu is executed, it will read the hardkeymenu.dat and wait for keystrokes.
The program if it finds within the same directory the file hardkeymenup.jpg (when in portrait)
or hardkeymenul.jpg (when in landscape) will use it as a background picture. Otherwise, it will
use the current desktop as a background picture.
If any matching sequence is found, then the relevant description (or picture if present) will be displayed.
If the user does not press any other key, then the relevant sound will be played (if present), the corresponding
program/file will be executed and hardkeymenu will terminate.
If no matching has been found, it will wait for 7 seconds and if no key is pressed it will exit.
If the nomatch.jpg picture is present then it will be displayed otherwise it will display
the key sequence.
The hardkeymenu can be assigned to a Hot-key for quick start up (usual Registry setting,
for example: HLM\SOFTWARE\Microsoft\Shell\Keys\40C7)
Setup/StartUp
---------------------
Setup
-----
The combination key sequence and command can be created by running the setup option.
This option appears when clicking anywhere on the screen while the program is running
and a popup menu will appear with the relevant 'Setup' option.
Through the Setup screens,
- the 'Description' to be displayed when the key sequence is found, can be set. If there is a file with the
same name and extension .jpg then it will be displayed instead.
- the 'Keys' (key sequence that is supposed to trigger the command that follows), can be captured by pressing the relevant
button 'Capture'.
Keys can be pressed and the program will display them for reference. To complete the capturing wait 5 seconds without
pressing any key and the capture screen will exit.
- the 'Command Line' (file to be executed) can be also selected. Pressing 'Browse' will display all files in the PDA and clicking on the
required file will fillin the command line.
- 'Command Parameters' (any optional parameters that might be required together with the command line) can be
keyed in.
- 'Sound', if checked then after selection before executing the 'Command Line', if a file with name 'Description'
and extention .wav will be played.
- 'Vib Scr.', is a script for Vibrating before executing the command. Letter L will produce a Long vibration, S will
produce a short one.
'Description', 'Keys' and 'Command Line' are required, if either is not set then the whole entry is ignored.
Navigation through the total of 20 entries is feasible with the 'Next' and 'Back' buttons.
A whole entry can be ignored by pressing 'Delete'.
Pressing 'Done' saves all the changes (No need to save one by one), 'Cancel' will ignore them all.
StartUp
------
- 'Sound', if checked then if a file with name 'waiting.wav' exists it will be played when the program starts.
- 'Vib Scr.', is a script for Vibrating as soon as the program starta. Letter L will produce a Long vibration, S will
produce a short one.
Installation Instructions
-------------------------
Copy all files provided to a directory of your choice (Including Storage Card).
All files including pictures mentioned must be located in the same directory.
Note:
if the message 'Wrong Version' appears, then delete the hardkeymenu.dat is the latest version is not
backwards compatible with the previous.
Log
----
19-01-2008:
Updated cscommandline to support ringer script.
12-01-2008: Version 3.2
- Added vibration support in the form of a script.
04-01-2008: Version 3.1
- Added Sound support as confirmation
If a file with the same name as the 'Description' and extension '.wav' exists in the directory of the hardkeymenu
the sound will be played as a confirmation while running the relevant program.
- On main screen a count down is showing the seconds left before the program exists if no key is pressed.
- Bug fix
03-01-2008: Version 3 - Added Setup option, stopped using ASCII File.
26-12-2007: Version 2 - A simpler remake of version 1
Below are some screenshots (remember that most of the pics including background can be customized).

Can you post any pics? things will goes interesting only with some screenshots hehe

Pics added,they are from the simulator using my own pics but they can be replaced with any other.

Very nice and unique.
I tied some of the directions on my dpad to some .exe's and got a certificate error? If i link to a lnk of the same .exe it works fine.
It would be awesome if a future version had a easier method of setting up the buttons to the desired path.
Good job Chrisstavrou! Thanks for sharing!

Thanks andason.
It looks like this certificate error pops up only with the first attempt to execute any program.
Is this correct ?
I am trying to figure out why this is happening but it looks that this message comes up when any program is first time executed in the PDA even from explorer.
I am adding a small setup form to help assign the keys as you mentioned.
Thanks
Chris

Version 3 is out
Included the setup option, no need to play around with the ASCII file.
Link has been updated in the first post.
If anyone has any comments etc let me know.
Cheers
Chris

Well another change as when using it, i wanted to hear a sound as a confirmation of what i had finally selected
I have included in the zip file some wav files as samples together with the pictures i am using to turn on/off bluetooth.
Have fun, any comments are welcome.
Chris

Added vibration support.

Changed cscommandline to support controlling of the ringer script

Related

[Voice Command] How to "import" new fonctions

I'm looking for a small .exe file that can switch to Today screen without closing applications (like 'Today' option in SBP Pocket +)
Why, you'll ask me ?
Because I'd like to switch to today screen with my voice using Microsoft "Voice Command"
I'm already able to :
- Power off
- suspend
- soft reset
- Rotate screen
my Magician with some little applications command by voice but I can't find an exe file to switch to today screen...
Thanks in advance
I find what I was looking for
I post it there if it interests somebody...
I use PHM Keys for Pocket PC a freeware developed by Philippe Majerus
I extract PHMKeys.exe (34 Ko) and put it in \Program Files\Today (but you can put it wherever you want)
After this I create a shortcut in \Windows\Starting Menu\Programs to PHMKeys.exe with this Target :
Code:
"\Program Files\Today\PHMKeys.exe" Today?"\Program Files\Today\PHMKeys.exe",-117
I name it Today.lnk
That way when I pronounce "Launch Today" the today screen appears
Very interesting because I also use VC. And I do want to use it for more, than the built-in abilities.
1. How to create a shortcut and what do its elements mean?
2. How to switch between full volume/no volume + vibra? Built in command only changes telephone volume.
3. How do your other named shortcuts look like? (Power off and so on)
I think u can just say "start today" on voice command without any extra addon. I just tried it and it worked.
RE
Hi DocteurN
Can share how to use VC to
- Power off
- suspend
- soft reset
- Rotate screen
and what programs are required?
Thanks
I would realy REALY like to add skype ability to VC.
Much like as the call command works, but instead of a regular, using SkypeOut.
Like saying:
say: Skype <conctact name>
VC response: home or mobile
say: Mobile
I know it's like: offering a finger and trying to take the whole arm, but this would be realy convenient.
Anyone an idea if this could be accomplished?
Chatty > to create shortcut I use Resco Explorer : I Tap and Hold on PHMKeys.exe then Copy. Second Tap and Hold then Paste Shortcut.
A file named PHMKeys.lnk is created.
Rename it Today.lnk for example
Make a tap and hold on this file then Properties > Shortcut
That where you copy :
Code:
"\Program Files\Today\PHMKeys.exe" Today?"\Program Files\Today\PHMKeys.exe",-117
Copy the link in \Windows\Starting Menu\Programs and that's all
ioneng > Yes you're right !
but I'm using the french version of VC and I made a wrong translation of what I said
FOSA > I'm using little exe files (freewares) I've found on the net and that extracted from packages
Here they are :
Heimiko > Sorry for Skype I've got no idea...
Seeking deeply in 'PHM Keys' I find that you can use PHMKey.exe for a lot of interesting things just by creating shortcuts
Here are what you can do (text is from PHM site) :
Today - Returns to Today screen
My Documents - Opens My Documents folder
Close - Closes active program
Task Switch - Toggles between running programs
Next Window - Cycle through open programs forward
Prev. Window - Cycle through open programs backward
Undo - Cancels previous action
Redo - Cancels previous undo action
Cut - Cuts the selected item
Copy - Copies the selected item
Paste - Pastes the selected item
Page Up - Move one page up / to previous page
Page Down - Move one page down / to next page
Volume +/- Changes Volume
Lock - Shows the system password screen
Suspend - Turns off your Pocket PC
Rotate - Next display orientation clockwise
Rotate Left - Toggle display between 0° and 270°
Rotate Right - Toggle display between 0° and 90°
Rotate Reverse - Toggle display between 0° and 180°
I make a zip of all this shortcuts.
You just have to copy PHMKeys.exe in \Windows and the lnk files in \Windows\Starting Menu\Programs (you'd better create a folder before copy)
You can rename lnk files the way you want and it would work with VC
Now I'm looking for an exe file that can mute/unmute the volume.
You launch it one time => mute
A second time => unmute
I only find this utility : AutoMute (11 Ko)
But it intended to turn the volume down for a specific interval of time...
Anybody knows an application that does that ?
RE
Hi DocteurN,
Thanks for the files.
Just one question though. When you use VC to activate the files (like reset, poweroff, screensave etc) is there a pop up message box which says "Are you sure you want to xxxxx...Yes..No" upon which you manually tap either YES or NO action or that it'll execute the program stratightway without any pop up message box?
BTW, where to install all the mentioned files?
Thanks again
No, there is no popup, the program is execute straightway
Where to install the files ?
There :
You just have to copy PHMKeys.exe in \Windows and the lnk files in \Windows\Starting Menu\Programs (you'd better create a folder before copy)
You can rename lnk files the way you want and it would work with VC
Click to expand...
Click to collapse
Anybody has an idea how to make VC read the e-mail to me?
That is what I am really missing on the road
thanks in advance.
RE
Hi!
I think your Reset has a problem.
When I click on it it pops up a message "Are you sure you want to rest your Pocket PC? Any unsaved data will be lost."
When I click on it it pops up a message "Are you sure you want to rest your Pocket PC? Any unsaved data will be lost."
Click to expand...
Click to collapse
No, Why ?
That what does a soft reset... If you haven't saved your data (a Word document for exemple you'll lost it)
If you're afraid it does a hard reset, that not the case
RE
Hi DocteurN,
There's another soft reset freeware utility which soft resets immediately WITHOUT a pop-up message. I managed to find on the net which does the job nicely.
RE
Hi noviur,
VC cannot read email to you.
What you need is a TTS (text-to-speech) 3rd party program. I think one of the Toshiba's PPC has a simple TTS engine built-in
Thank you, Fosa
I know that it can not... but thought may be somebody tweak it
I was looking for any TTS application for PPC... Found something called Fonix Voice Central - they described it as app, which is doing it - i tried - no way
any suggestions would be appreciated
There's another soft reset freeware utility which soft resets immediately WITHOUT a pop-up message
Click to expand...
Click to collapse
FOSA > That interests me
Could you upload it here ?
Thanks by advance !
RE
Hi DocteurN,,
See attached

HButton for smartphone

Hi,
I created HButton for smartphones. BUT I have no smartphone so I developed it on smartphone emulator.
I will be very gladly, if there is someone who can test it.
Please note: Test it on your own risk - never been run on real smartphone.
thanks
Hundera
Great! While I have no time to test it right now, I'll frontpage the news if it turns out to be working!
when i get to the assign window, i get stuck there, don't know what's the next step
oldsap said:
when i get to the assign window, i get stuck there, don't know what's the next step
Click to expand...
Click to collapse
Hi,
I created it little messy. It has to be changed before official release.
* Using * assign it to any HW button. I don't know if there will be name and icon of selected button or just something like "unknown 40C1".
* Create list of applciations
* Left and right button select preferred application​* enter to add it to list​* Press OK.
thats all. Now you should be able to start application using HButton....
What now?
I managed to do almost everything:
I assigned applications to the list of button1,
I clicked on '*', and so
Assigned to (*) displays "Unknown 40C1"
When I run the application Button1 manually, the application I chose for Button1 is run.
But what now? What do I have to press to make the application run? What is button1? I tried all buttons, pressing for various lengths of time, but I can't get it to run.
Do I need to edit the registry so that the application "Button1" is assigned to some button?
Hi,
at first thanks for help.
"Unknown 40C1" means - there are registry part about this button. In SPh, there's missing names of buttons - so name is unknown.
I has no SPh, only emulator. I checked registry and there is all ok - only names are missing. All flags and path to applications that should be started are similar to pocketpc.
These registry settings are altered by my program so HButton1 should be started by button with code "40C1". What button it is - I really don't know. That's what I need to test.
But as you describe it, it looks like that these settings are ignored.... So Where is settings of button's behavior on smartphone?!?!
ghostwheel said:
I managed to do almost everything:
I assigned applications to the list of button1,
I clicked on '*', and so
Assigned to (*) displays "Unknown 40C1"
When I run the application Button1 manually, the application I chose for Button1 is run.
But what now? What do I have to press to make the application run? What is button1? I tried all buttons, pressing for various lengths of time, but I can't get it to run.
Do I need to edit the registry so that the application "Button1" is assigned to some button?
Click to expand...
Click to collapse
not totally sure
I'm no expert in this.
If I understand correctly, one way to do it is through links in the \windows directory,
so
\windows\short_MSG
is a link to the program called when the message button is pressed
\windows\short_Camera, and short_IE
are for camera and explorer button.
But I think there are also other places to set these. And some phones allow long_MSG,IE,Camera links for long button press - not mine.
I tried to copy the Button1 link to short_MSG, and that managed to run the first command in the list for button1, but not the next on a longer press. (And it still launched the message program first, so there must be a second place that determines what is launched...)
Maybe people in the smartphone forum will have more info...
All this was on an s620 WM6.1
just a few more comments
Now that I can get HButton to partially run, I have a few comments:
I'm not exactly sure why, but going from HBSetup to configure buttons 1 and 2 takes a really long time. HButtonTask is much shorter. Maybe it is because a list of all programs is generated, and this takes time? In any case, maybe one could display a message "please wait..." - the first time I thought the program had crashed.
Pressing left (instead of right) when the bottom selector in HButton1 setup shows <None> crashes the program (ArgumentOutOfRangeException)
In HButtonTask setup there are two arrows below Custom delay (I think to chose the delay), but no number is displayed, and pressing left-right only toggles the boxes.
<Start Menu> doesn't work. <Clock>, <Toggle BT>, <Quit>, <Today> do work. <Back> behaves a bit differently than the Back key - it switches between tasks, instead of screens - but that's ok and can be useful!
In the HButton1/2 setup screens, I would change the left softkey to "save" instead of "ok". Too often I pressed that button instead of the center/enter button to change the action on the list. Because it takes ~10 seconds to enter the screen again, it is quite annoying....
Hi
I am really interested in this project if is still under developement

Locking the Volume Buttons

I see this is a problem on the Omnia too, but when I lock my HD by holding down the call "End" key (Right Hand touch pad) the volume buttons are not locked!
Has somebody provided a tweak/fix for this calamatous feature?
Sorry, I don't know of a fix. Maybe third party apps that can assign another function to the volume buttons??
But the plus side of this feature is that when you are listening to music, you can put the phone on standby (to avoid accidental presses in your pocket), but you can easily reach into your pocket with your finger and turn the volume up or down without having to wake up the phone. Of course if you use headphones with volume control on them, then you don't need to reach in your pocket.
The volume keys will never be blocked. You cannot block them
you can try to use AEButton Plus and SKSchema!
You must make 2 different config files in AeButton, one wich leaves the Volume Buttons as they are (Default) and one disabeling them. Now you must make a script with SKSchema, wich changes everytime the Block starts or ends the config file of AeButton! This way you can use one Button configuration for the application "Phone Locked" and the other configuration for everytjing else!
Here is the instruction:
Save your default AeButton Settings (are located in the AEButton Program Folder) lets save them to \My Documents\AEBPlus Default\AEBPlus.cfg
now configurate AEButton with different settings (for example disable Volume up/down keys), lets save this cfg file to \My Documents\AEBPlus Locked\AEBPlus.cfg
Open SKSchema, type this script:
Code:
#r(#copyfile) #p(\My Documents\AEBPlus Locked\AEBPlus.cfg;\Program Files\AEBPlus\AEBPlus.cfg) #wait(1)
#r(\Program Files\AEBPlus\AEBPlus.exe) #p(0000) #waitfor(1)
the sense of this is to change the cfg files and to reinitialize AEButton
Save the Script as AEButtonLocked.sksc
Now we write a new script to do the opposite (change to default configuration:
Code:
#r(#copyfile) #p(\My Documents\AEBPlus Default\AEBPlus.cfg;\Program Files\AEBPlus\AEBPlus.cfg) #wait(1)
#r(\Program Files\AEBPlus\AEBPlus.exe) #p(0000) #waitfor(1)
Save the script as AEButtonDefault.sksc
Now we configure SKSchema to monitor for 2 events: opening our application (device lock) and closing it: add a new event in the SKSchema monitoring configuration: when the device lock application opens or closes start the scripts. (they are locates in
Code:
\My Documents\sScripts[/B])
so type this: [B]#c[[COLOR="Red"]shutil.dll[/COLOR]] #on[\My Documents\sScripts\AEButtonLocked.sksc] #off[\My Documents\sScripts\AEButton.sksc]
I DONT KNOW the lock Application EXE wich is running i hope it works..shutil.dll should maybe be rplaced with a EXE ...use some locker with a running exe (S2U... TouchLockPro (my favorit ))
You could lock the device when the stylus is putted in. This has two major advantages. You won't loose your stylus and you won't let your device unlocked.
Mobilemagic has a quirk in it that when you assign the buttons to a multi press application it disables a single press. See post 203 in this thread. It works great for me.
http://forum.xda-developers.com/showthread.php?t=449654&page=21
Great post Koffein, thanks. Actually TouchLockPro looks exactly what I'm after (and I didn't even know I needed it), I'll give it a try and see if it works for me. The usability of this device is getting so much better by the minute thanks to you xda guys!
Glad I could help, here are some tips for using TochLockPro
In Registry goto HKCU\Software\ZuinigeRijder\LockSettings\
and set the D-WORD "UnlockOnLightSensorTime" to 300, now your device will be unlocked after a shorter time period (0,3 sec) when it wakes up and "sees" light.
For me it is the best unlock method in the pocket it stayes locked, if it is activated accidently,
but when i activate it in a not too dark room while it is in my hand it unlocks automatically.
Adjust the other values if you want to customize it more

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

VJ KeyPress - Send a '1' to the phone.

Okay, so I'm using Google Voice with call presentation on, and I want to setup a shortcut to send a '1' to the phone to accept an incoming call. I just got a bluetooth watch and I want to be able to have the watch send the key so I don't need to dig out my phone when I'm in the car.
So, to test this a little bit I installed KeyPress and I setup that if I double press my start button in AE Buttons, it runs KeyPress with the parameter of 97. This works perfectly. No issues at all.
But when I try to create a short cut, everything fails. If I just press tap VJKeyPress, I get the little "help" screen. If I create a shortcut, and tap it, I also get the help screen. But when I try to modify the shortcut to pass the '97', then it fails.
I'm guessing that I'm missing something in the syntax, but I can't figure it out.
I have the path, in quotes:
"\P F\vijay555\VJKeyPress\VJKeyPress.exe"
Then I've put 97 at the end just plain, in quotes, in <>, I've put in right behind the .exe inside the quotes... Nothing seems to work at all. I'm at a total loss.
Anyone have a suggestion?
Hi,
Could you send me a screenshot of the configuration screen in AE Buttons.
I can't think why it wouldn't work, but what you could do is create a normal shortcut that launches VJKeypress with the required parameters, and then use AE Button to launch that .lnk shortcut itself, rather than VJKeyPress.exe
Should you get really stuck, VJBrisk might be able to help you, but I think the above should be adequate.
Drop me a PM (and post in the thread) again if you get stuck.
V
Oops... I didn't think I explained myself properly.
The AE Buttons is WORKING. It's the normal shortcut link that I can't get to work... and that's the thing I really need to get working.
Sorry, my bad, didn't read it properly.
I normally put example shortcuts in my cabs, but curiously I've got none in the cab on my phone. Can't believe the app is nearly 5 years old! Wow.
Anyway, I just tried making a shortcut.
If you paste the following:
Code:
55#"\Program Files\Vijay555\VJKeyPress\VJKeyPress.exe" 133
into a text document, and rename it Test.lnk, and copy that over to your phone, it should create a shortcut that locks your phone.
If that works, just change the parameter to do what you want.
What app are you using to create shortcuts?
And what's the significance of the \p\f in your first post?
V
A bit more information...
I tried to write a simple MortScript to run this as well. According to the MortScript manual, to run an app, you use this command:
Run ( "\path\AppName" [,"Parameter"] )
In other words, the path and the command first, and then put in the optional parameter. When I put in just the app name:
Run( "\Program Files\vijay555\VJKeyPress\VJKeyPress.exe" )
And run the script, I get the little help popup as I would expect. When I put in the parameter:
Run( "\Program Files\vijay555\VJKeyPress\VJKeyPress.exe" , "97" )
Nothing happens.
vijay555 said:
If you paste the following:
Code:
55#"\Program Files\Vijay555\VJKeyPress\VJKeyPress.exe" 133
into a text document, and rename it Test.lnk, and copy that over to your phone, it should create a shortcut that locks your phone.
Click to expand...
Click to collapse
Okay... well that locked the phone fine.
If that works, just change the parameter to do what you want.
Click to expand...
Click to collapse
I'm using both the text editor on Windows and Word on my PPC (not saving it in Word Format when prompted).
What app are you using to create shortcuts?
Click to expand...
Click to collapse
Just Copy the original file and then paste as shortcut.
And what's the significance of the \p\f in your first post?
Click to expand...
Click to collapse
Didn't feel like typing out \Program Files\.
Okay, so using the '133' definitely worked, but when I change it to 97 (the code to send NumPad1), it doesn't work.
But it DOES work when I tell AE Buttons to run VJKeyPress with the parameter of 97. Ugh... very odd.
Just for the fun of it, I also tried setting up a button in AE Buttons to run the shortcut that has '97' in it. That didn't work. I'm at a complete loss to figure out what's going on.
It may be that the keypress is occurring, but it's being fed into AE Buttons rather than the Phone Dialler, ie if when you press the required button, AE Button becomes active, which launches VJKeyPress, which presses 1 <b>within</b> AE Button, not the phone dialler.
You could test this by trying other keys and seeing what happens.
Also try activating Word or something else on your phone and launch the shortcut - see if the desired key gets pressed.
Also, you said NumPad1 - this is the number pad on a pc keyboard.
Try 49, which is just key 1.
V

Categories

Resources