yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Software Development] howdykeith:
Portable Installation on USB-Drive

As posted here.

Portable Installation on USB-Drive

With the use of commandline parameters cards can be started from any usb drive on any Windows PC.

MortScript does not require an installation. You can start any script file via commandline like this:

D:\MortScipt\MortScript.exe D:\scripts\myscript.mscr

Batch

If you want to start cards independent from the drive letter (which can change from pc to pc) you can create a batch file with one line like this :

%~d0\portable_apps\MortScript\MortScript.exe %~d0\Cards\Cards.mscr TOPICS_ROOT="%~d0\Topics" C_pathPcEditorExe="%~d0\portable_apps\my_editor\my_editor.exe" C_sPcEditorWndTitle="my editor" C_pathPcViewerExe="%~d0\portable_apps\my_viewer\my_viewer.exe" C_sPcViewerWndTitle="my viewer"

Explanation:

* %~d0 is a variable containing the drive letter of the path of the batch file.

* %~d0\portable_apps\MortScript\MortScript.exe: path to MortScript.exe (needed)

* %~d0\Cards\Cards.mscr: The first parameter (after MortScript.exe) has to be the path to the Card.mscr (needed)

* TOPICS_ROOT="%~d0\Topics": path of the directory containing the topics and the preferences of cards (needed)

* C_pathPcEditorExe="%~d0\portable_apps\my_editor\my_editor.exe": path to an editor application exe-file (only if you want to use an extra application)

* C_sPcEditorWndTitle="my editor": title of the editor application window (only if you want to use an extra application)

* C_pathPcViewerExe="%~d0\portable_apps\my_viewer\my_viewer.exe": path to a viewer application exe-file (only if you want to use an extra application)

* C_sPcViewerWndTitle="my viewer": title of the viewer application window (only if you want to use an extra application)

Note: If do want to use only plain text files and no extra application to edit these files, just set C_bMortScriptOnly=1. Example:

%~d0\portable_apps\MortScript\MortScript.exe %~d0\Cards\Cards.mscr TOPICS_ROOT="%~d0\Topics" C_bMortScriptOnly=1

PStart

PStart by Jens Gruschel is a really good programm for launching programs from usb drives. PStart is Freeware and available at: www.pegtop.net.

Launching cards with PStart:

1. Use "Add file" in the menu "Edit" to select MortScript.exe.

2. Right click on the created "MortScript"-Icon an select "Edit".

3. Now you can setup the "Name" and "Command line parameters" (similar to the batch file)

Example "Command line parameters" (one line):

%pdrive%\Cards\cards.mscr TOPICS_ROOT="%pdrive%\Topics" C_pathPcEditorExe="%pdrive%\portable_apps\AkelPad\AkelPad.exe" C_sPcEditorWndTitle="AkelPad" C_pathPcViewerExe="%pdrive%\portable_apps\AkelPad\AkelPad.exe" C_sPcViewerWndTitle="AkelPad"
[Windows Mobile Software Development] howdykeith:
Today Plugins & App Shells Mortscript can interact with

Registry display plugin

Billboard - Works with the standard Today panel. WM5/WM6 compatible.

"SlidingPanel" (Bronze plugin)

+++++

Obviously we can launch a mortscript anywhere that allows for a exe, or we can create the exe autorun for our Mort scripted app.

Interesting uses:

Shake & Launch

Task managers that allow for a hotspot.

++++

Menus:

ceFFM - A Fingerfriendly Menu (Shell)

JMLmenu.exe

JMLMenuSense - Sense UI Look 'n Feel XML-Menu

kvvQuickMenu - Customizable set of shortcuts in a drop-down menu with graphics.

QuickMenu - Is a start-menu stronger than Smallmenu, it is from China, now you can try the English version

AND

Configuration tool for "Mortscripter"

++++

Xperia X1 html panel creator - With this tool you can easily create HTML panels for Sony Ericsson Xperia X1

XHTML Elements
[Windows Mobile Software Development] howdykeith:
Tools that help

Remote Mobile Control:

MyMobiler

Mortscript Editing:

MortScript IDE v0.1 - Although any text pad will do. This IDE is not really functional yet and probably will slow you down were you to try it. This IDE is not updated for newer code syntax and as of yet many functions are not connected.

www.TextPad32.com.

notepad++

Registry Editing:

CeRegEditor - Remote registry editing from your PC. Awesome.

WinCE Registry Editor (mRegEdit)

Total Commander

RegLogger

Paid apps:

Resco Registry Explorer

Cabintegr

XmlToReg - Convert registry provisioning files to .reg files

WinMerge

Windows Mobile 6.x Registry Changer

How do I track registry changes? - a tutorial

- WinDiff

make a registry snapshot.compare

URL Snooper

Cab Files:

How to Create .Cab Installation files

WinCE_Cab_Manager_2.1.0.35

MSCEInf - Utility to find and analyse all the data contained in installation CAB files.

QuickCab 2.0 Cab Creation Utility

Windows Mobile Package Manager - Will help you to create software bundles and install them on WM device unattended.

Wceload Tool

WCELoad dirty little secrets

HTC Autorun.exe – 1st Boot Customization

XML Editing:

XML Notepad 2007

Exchanger XML

Keyhole Markup Language

HxD - Freeware Hex Editor and Disk Editor

Rom Burning:

RapiConfig described and found
[Windows Mobile Software Development] howdykeith:
Emulators

Run a PPC/SP on your computer.

Windows Mobile DeviceEmulator phone numbers! -

WM 6 SDK and Cellular Emulator - (Can you hear me now?)

...After resetting, it can visit internet -

internet connection in WM6 emulator -

Certificate Improvements in Windows Mobile 6

Where can I download a standalone Windows Mobile 5 device emulator?

Standalone Device Emulator v1.0

Download the Microsoft Device Emulator 1.0 with Windows Mobile OS Images - (Pocket PC and Smart Phone)

Windows Mobile 6.5 Developer Tool Kit

Getting Started with Widgets on Windows Mobile 6.5

Windows Mobile Developer Power Toys
[Windows Mobile Software Development] howdykeith:
More Registry Settings

HTC Touchscreen Registry Edits

HTC Non-Touchscreen Registry Edits

Windows Mobile Registry Edits

Windows Mobile 5 Registry Tweaks

Enable Internet Sharing on Touch Pro

If you have tried using internet sharing only to find it returns a sign-in error, try this tip from xda-developers. Open the registry and delete the key (not just the value) [HKEY_LOCAL_MACHINE\Comm\InternetSharing\settings] ForceCellConnection.

Quick access to Comm Manager:

* Instead of clicking the start button, looking for Comm Manager App and clicking it, just hold down the Home button for 2 seconds. It works from the home screen or within any app.

How to get the install path for your installed apps:

HKEY_LOCAL_MACHINE\Software

HTC GSensor !Native! auto rotation

Just figured out that New Gsensor Driver from Dimond2 is suitable for customisations. You do not need 3rd party solutions to make other application to rotate the screen. But it could be done directly in the registry, but i think it's a matter of time to have GUI

Special thanks to the person how created the attached cab unfortunetely i do not know his name (Jmz i assume)

here is the example for RSSHub

You need to specify the module name (application exe)

and put into the white list Window names (could be found by TaskMrg)

Then reboot and enjoy

[HKEY_CURRENT_USER\Software\HTC\HTCSENSOR\GSensor]

"AutoRotation"=dword:00000001

[HKEY_CURRENT_USER\Software\HTC\HTCSENSOR\GSensor\W hiteList]

"RSSHub_ItemView"="ItemViewWindow"

"RSSHub_HeadLine"="HeadLineWindow"

"RSSHub"="NewsBreak_Main"

"Calculator"="CalculatorMain"

[HKEY_CURRENT_USER\Software\HTC\HTCSENSOR\GSensor\M oduleName]

"RSSHub"="\Windows\RSSHub.exe"

"Calculator"="\Windows\htcCalculator.exe"

PS. The entry for Calculator is for New HTC Calc with a landscape mode

Adobe Reader:
[Windows Mobile Software Development] howdykeith:
PhoneAlarm Command-Line Options (They're so good they get their own post)

From the PhoneAlarm pdf Manual:
[Windows Mobile Software Development] howdykeith:
What Mortscript Is Not

We can't capture a key. It is not a key capture driver.

It can't run apps in the background if the app doesn't have support for running hidden.

POOM functions. Make and delete appointments. Read and send email/sms without opening TMail.
[Windows Mobile Software Development] howdykeith:
How-to: Program other function to the useless backlight key

Originally Posted by MvanIperen

it is mappable

add the following key to the registry:

HKLM\SOFTWARE\Microsoft\Shell\Keys\40C8

and create values just like another key (i.e. 40C5)

soft-reset and then you are able to program the button.

40C1-Contacts

40C2-Video Telephony

40C3-Camera

40C4-Voice Recorder

40C5-Speed Dial

40C6- Volume up

40C7- Volume down

40C8-Backlight (now added)

40C9 - Calendar

1. install PHM Regedit (or any other registry editor)

2. go down to this location HKLM\SOFTWARE\Microsoft\Shell\Keys

3. create a key "40C8"

4. Go to the key HKLM\Software\Microsoft\Shell\Keys\40C5

5. Select all values under that key and copy it

6. Paste it under the new key "40C8" you just created in step 3

7. rename it to suit a readable name like "Backlight"

8. Softreset using some app like psShutXP or pocket plus (and NOT using the hole)

8. now, you can configure this button as u do normally (for the rest of the buttons)

Basically, I now get the idea of how to assign these. Thus, we can also assign "press and hold" functions to button 1, 2, and 3, by simply copying the files off 40C4 and renaming "button 4" to either 1, 2, or 3, depending which button we want the "press and hold" function.

Hi, all!

I disassembled keybddr.dll and found key assosiations:

40C1 = contacts (programmable, VK_LWIN + VK_APP1)

40C2 = video telephone (programmable, VK_LWIN + VK_APP2)

40C3 = camera (programmable, VK_LWIN + VK_APP3)

40C4 = record [press & hold] (programmable, VK_LWIN + VK_APP4)

40C5 = voice speed dial (programmable, VK_LWIN + VK_APP5)

Mail, Browser, Fn+Right, TTalk, tEnd, Soft1, Soft2, VolumeUp, VolumeDown, Ok, and so on - are HARD CODED buttons (it's functionality coded in to driver body)

VolumeUp = VK_RWIN + VK_TVOLUMEUP (VK_TVOLUMEUP = VK_F6)

VolumeDown = VK_RWIN + VK_TVOLUMEDOWN (VK_TVOLUMEUP = VK_F7)

OK = VK_RWIN + VK_DONE (VK_DONE = VK_F6)

But i can't found any entry's of Backlight button.

Now, i developing keyboard driver for Qtek9000(95 % compleate), as MacCentre Pocket RussKey 2003 module.

At this driver i will use follow programmable associations:

40C1 = contacts (programmable, VK_LWIN + VK_APP1)

40C2 = video telephone (programmable, VK_LWIN + VK_APP2)

40C3 = camera (programmable, VK_LWIN + VK_APP3)

40C4 = record [press & hold] (programmable, VK_LWIN + VK_APP4)

40C5 = voice speed dial (programmable, VK_LWIN + VK_APP5)

40C6 = mail (programmable, VK_LWIN + VK_APP6)

40C7 = browser (programmable, VK_LWIN + VK_APP7)

40C8 = backlight (programmable, VK_LWIN + VK_APP8)

40C9 = wireless (aka Fn+Right) (programmable, VK_LWIN + VK_APP9)

40CA = may be backlight [press & hold] (programmable, VK_LWIN + VK_APPA), <- but i not decide it :lol:.

the following process to change the right soft key in Manila

Originally Posted by jackleung View Post:

[HKEY_LOCAL_MACHINE\Software\OEM\VoiceCommand]

"Path"="\\Windows\\<what ever program>.exe"

"VoiceCmdEnable"=dword:0

"LaunchAPEnable"=dword:1

"VoiceCmdDuration"=dword:a
[Windows Mobile Software Development] howdykeith:
Access Outlook email, appts, etc...

So quite often we want to access Outlook email, appts, etc...

Here is a sample of POOM programming, and what is necessary to access these elements.

We can't do this in mortscript, but we want to.

Posted at the PPL forum:
[Windows Mobile Software Development] howdykeith:
Mortscript is boring. What's next?

So let's say you aren't happy with the Mortscripting thing. you want more power. More native stuff. More graphics stuff. More interface stuff.

FBA Creator

LuaTool 1.2 - Lua Decompiler, Compiler and Compare

eTcl - available for Linux, Windows, MacOSX and now Windows Mobile (PocketPC and Smartphone, edition 2003, 2003SE, 5.x and 6.x). eTcl brings the power, productivity and flexibility of the Tcl programming language to desktop and mobile platforms.

PPL Pocket Programming language

Basic4PPC - Complete development environment on the Pocket PC or on the desktop. Build your applications GUI with the visual designer, add some code and your done. SmartHelp and AutoComplete. Whenever you write a control's name, a list of all its properties and methods pops-up for you to choose from. When writing one of the keywords, its syntax will show up to help you get through all the parameters. Distribute your applications royalty free. You are free to distribute your compiled applications without any restrictions. Basic4ppc allows you to compile your applications to standalone Windows / Device executables.

Python Windows CE port

.Net

compiler stuff. Borland?

Scripting with Windows PowerShell

pash - PowerShell open source reimplementation for "others" and Windows (including Windows Mobile and Windows CE). About the name, Pash = Posh (PowerShell) + bash(one of the Unix shells)

There are a few other scripting languages that are nowhere near as versatile as Mortscript, so we will skip those.
[Windows Mobile Software Development] howdykeith:
Tools that help: Part Two

Let's edit code while on the road.

There are more text editors than i have cats and dogs. Too many.

But which can:

This is Mortscript. Many of the commands I have to check in the manual for syntax quite often. I am going to want be able to drop in these commands into my script editor as well.

The Mortifier - Mobile Script Editing

WindowAppRec.mscr - A window title/process util

Adobe Reader for Mort Manual

I think there is an html version? That would be nice.
[Windows Mobile Software Development] howdykeith:
Mortscripts that Aid in Mortscripting

TaskManager

WindowRecorder

This is what Choice looks like on a PPC and then on a SmartPhone:

This is what Message and BigMessage looks like on a PPC and then on a SmartPhone:

now on Message, im using a message skin, so it would be more of a notification bubble if i wasnt:

I wonder what Choice looks like on the PPC?
[Windows Mobile Software Development] howdykeith:
Mortscript v4.2 is older than my Mom's phone.

I kind of treat the beta mortscript as the working version. Mostly because I really like certain CallFunction stuff.

Lets be more specific and list out the certain commands that stop code from running on the old 4.2. And what options are available when we dont use the beta Mortscript (even though it is much cooler).

Named Parameters in Sub

CallFunction

There are Version milestones which, if we don't take care, will stop our new scripts from running on older versions. There are some work arounds for situations where you need to account for this:

Sub MainFunc (PassedNum)

Older Morts can't read passed vars. So requires argv[1]:

Sub MainFunc (PassedNum)

Local(PassedNum)

PassedNum = argv[1]

I think something like this would work, but i need to test it:

Sub MainFunc (PassedNum)

PassedNum = (IsEmpty(PassedNum)) ? PassedNum : argv[1]

I guess PassedNum = argv[1] is better.

I am also not sure of the need/advantage of Local.
[Windows Mobile Software Development] howdykeith:
Mortscript Code Dictionaries

Hi,

I have been using TextPad32 for years. I strongly recommend trying it if you haven't already. I set up a Mortscript code dictionary add-on for www.TextPad.com

You will notice it is in alphabetical order, but also grouped by obvious section.

For example the Operators, they are listed by (sample):

Op: division

Op: Multiplication

Op: Negation

Op: Parentheses

Op: Power (x^y ? xy)

I also added the definitions of the possible types for constants:

#Allowed types: "YesNo"/"YesNoCancel"/"OkCancel"/"RetryCancel"

Question( question [, title [, type ] ] )

Many other text editors allow you to add your own command dictionary. Feel free to port the dictionary i set up over to your editor.

Of course please post em back here...

1,827

UPDATE:

I updated the TextPad dictionary to include "" wherever possible Vars can be replaced with "Text":

Kill:

Kill( process name"" )

That way we don't have to hunt and peck for the "" keys...

UPDATE (5/27/10):

I fixed a bunch of things. Fixed some omissions, typos.

I alphabetized the Syntax list document, so it will load as fast as possible into Textpad.

UPDATE:

Extract the user folder inside the program files \ Textpad directory.

Mort Script should appear in your script library.

C:\Program Files\TextPad 5\User

Update again: Added Text Highlighting for Mortscript code class. You will need to select from the TextPad menu: Configure / Preferences / Document Classes, and add the mscr/Mortscript Class and select the Mortscript Syntax list.

Also I added a couple more Mortscript definitions that I had missed.

****

I'm using ScitePortable with the MortScript IDE functions. It's got most MSCR code functions enabled, and it's pretty easy to create new ones for the new code functions.

Here's the link here on XDA-DEV and then the original post over here.

I don't think it's being maintained any more but here attached is a slightly updated / fixed IDE set to play with.

******

Syntax-Highlighting in my favourite text-editors: UltraEdit and Notepad++

Alas, I decided to create them myself. Hoping this may proof helpful for you other MortScripters, here they are for download.

I assume, you know how to install it in UE and N++ ;-)

Sir.John

For further Notepad++ development you can look HERE.
[Windows Mobile Software Development] howdykeith:
Strange Things

Sub > Run Script

The name of the Subroutine is "> Run Script". ">" is an ok string char.

Also " " is a string char as well. I will post an example I saw which was unexpected.

There are a lot of ways to skin the cat:

i = 1
ListElem[i] = "Yawn"
#2
i +=1
ListElem[i] = "Cant sleep"
#3
i +=1
ListElem[i] = "Never give up"

NextElem = MaxIndex( ListElem ) + 1

LibPath = Array( "Pick Me", \
"Dont Pick Me", \
"Dont Pick You Friends Nose" \
)

Usually when i am handling arrays bu hand, i am populating choice statemnts.

Because I need to attach the Choice options to a Switch statement, for clarity and ease or coding, I have evolved to listing the array elements

LibPath[1] = "Pick Me"
LibPath[2] = "Dont Pick Me"
LibPath[3] = "Dont Pick You Friends Nose"

is easier than Array ("Pick Me","Dont Pick Me","Dont Pick You Friends Nose")

Especially when there are 10 or 12 items to "Pick" from.

Or:

LibPath = Map( \
1, "Pick Me", \
2, "Dont Pick Me", \
3, "Dont Pick You Friends Nose" \
)

Also:

If (-1)
message(-1)
EndIf

If (0)
message(0)

EndIf

If (Not 0)
message("Not " & 0)
EndIf

If (1)
message(1)
EndIf

If (2)
message(2)
EndIf

Hi.

A while ago i was griping about an If statement being activated if the condition was not true.

It was the -1 that i was confused about.

So 1 = true

2 = true

and -1 = true.

Now I know. Just means we gotta:

If (-1 > 0)
message(-1)
EndIf
[Windows Mobile Software Development] howdykeith:
setting up my profile switching through mortscript, thought some one might find this useful

reg HKCU\ControlPanel\Notifications\{A877D65B-239C-47a7-9304-0D347F580408}\

regDword Options = tick boxes for "new text message"

Code:

dword	|	Sound	|	Vibrate	|	Flash light	|	Show Message
1	|	x	|	-	|	-	|	-
2	|	-	|	x	|	-	|	-
3	|	x	|	x	|	-	|	-
4	|	-	|	-	|	x	|	-
5	|	x	|	-	|	x	|	-
6	|	-	|	x	|	x	|	-
7	|	x	|	x	|	x	|	-
8	|	-	|	-	|	-	|	x
9	|	x	|	-	|	-	|	x
10	|	-	|	x	|	-	|	x
11	|	x	|	x	|	-	|	x
12	|	-	|	-	|	x	|	x
13	|	x	|	-	|	x	|	x
14	|	-	|	x	|	x	|	x
15	|	x	|	x	|	x	|	x

regDword Duration, dword in 5, 10, 15, 20, 30, 45, 60 = "flash light for"

regString Wave = path to file to be played on "New text message"

regString Default = description
[Windows Mobile Software Development] howdykeith:
Mortscript on your PC

It can be hugely beneficial to test your script on your PC.

Rather than copying the script to your phone over and over while u debug tiny errors.

Keep in mind, what may work on the phone, may not work the same on the PC.

Using TextPad I can have tabbed windows for:

Document Selector

File Explorer - Right click on the mscr and click open to run on the PC. Double click to open in Textpad

Mortscript Code Library
[Windows Mobile Software Development] howdykeith:
Coding Choice Statements for Fun & Profit

MessC[1] = "Twitter"
MessC[2] = "Facebook"
MessC[3] = "MySpace"

Title = "CycHowdy Messenger"
Hint = "Choose Messenger:"

Choice( title, hint, MessC )
Case( 0 )
Exit

#Twitter
Case( 1 )

#Facebook
Case( 2 )

#MySpace
Case( 3 )

EndChoice

So with 20 choices and then inserting or removing options means carefully re-numbering all the choices.

After:

Twitter = 1
MessC[Twitter] = "Twitter"
Facebook = 2
MessC[Facebook] = "Facebook"
MySpace = 3
MessC[MySpace] = "MySpace"

Title = "CycHowdy Messenger"
Hint = "Choose Messenger:"

Choice( title, hint, MessC )
Case( 0 )
Exit

Case( Twitter )

Case( Facebook )

Case( MySpace )

EndChoice

Or:

MessC[1] = "Twitter"
MessC[2] = "Facebook"
MessC[3] = "MySpace"

Title = "CycHowdy Messenger"
Hint = "Choose Messenger:"

idx = Choice( title, hint, 0, 0, MessC )

#MessC[0] eq ""
If( idx )
Else
Exit
EndIf

Switch ( MessC[idx] )

Case( "Twitter" )

Case( "Facebook" )

Case( "MySpace" )

EndSwitch

So you can see if you have lots of choices, it's still easy to re-sort them, without having to deal with all the re-numbering later...[/QUOTE]

Addendum:

MenuN = 0

MenuN += 1
foursquare = MenuN
MessC[foursquare] = "foursquare"

MenuN += 1
Facebook = MenuN
MessC[Facebook] = "Facebook"

By incrementing MenuN dynamically, we can now add and readjust the menu items without editing the numbers at all.

ADDENDUM:

So once we have a large menu list, u can see how the code grows quite a bit. It then occurs to me we can get rid of that whole pile by:

MessC = Array ("foursquare", "Facebook", "Twitter", "MySpace")

LastChoice = Choice( title, hint, LastChoice, False, MessC )
Switch(MessC[LastChoice])
Case( 0 )
Exit

Case( "Twitter" )
...
EndSwitch

That works real well. So juggling menu options and choices becomes super easy.

And for subs:

MessC[1] = "Twitter"
MessC[2] = "Facebook"
MessC[3] = "MySpace"

Result = Choice( title, hint, MessC )

Call(MessC[Result])

Sub Twitter
EndSub
[Windows Mobile Software Development] howdykeith:
@ReadFile, well that's just great

ReadFile behaves belligerently, here is a more tamed @ReadFile function:

ReadFile.mscr:

# Mortscript to ReadFile
#0 False
#1 connected but no page
#else Read File

#This is so we can pass args
URL = argv[1]
DoRetry = argv[2]
If (DoRetry)
Repeat ( DoRetry)
@retryConnection
EndRepeat
EndIf
If (InternetConnected( "http://www.Google.com" ))
Success = True
Return(Success)

ErrorLevel("off")
ReadFile( URL, Success )

Return (Success)
Else
Return (-1)

EndIf

#This is so we can Include

Sub ReadFile (URL, DoRetry)
CallScriptFunction( SystemPath("ScriptPath") \ "ReadFile.mscr", FileDatas, URL, DoRetry)
Return(FileDatas)
EndSub

Sub retryConnection

#	retries = 3
#IniRead( iniFile, "Connection", "Retries" )
retryTimeout = 5
#IniRead( iniFile, "Connection", "RetryTimeout" )

connOpened = False
for i = 1 to retries
#	message(i)
sleep(retryTimeout*1000)
connected = False
connected = InternetConnected( "http://www.google.com" )
If (connected)
connOpened = True
break
Else
#retry check
#	message("not connected "&i)
EndIf
Next

#	message(connOpened)
return (connOpened)
EndSub

So in our app we do a:

Include ("ReadFile.mscr")

So we can do a:

FileDatas = @ReadFile( "http://www.MyData.html")

Which of course replaces:

FileDatas = ReadFile("http://www.MyData.html")

The interesting part is that we are doing an include on the ReadFile.mscr, and the include subroutine does a CallScriptFunction on the ReadFile.mscr to get the URL data.