[Windows Mobile Software Development] howdykeith:
S2U2 Controls and Mortscript

S2U2 (Slide 2 Unlock 2)

We can control S2U2 from Mortscript:

Too bad we can't replace:

IF (ProcExists("S2U2.exe"))
sleep(1000)
mousedown(85,740)
mouseup(425,740)
Endif

With:

IF (ProcExists("S2U2.exe"))
RunWait ("\program files\s2u2\s2u2.exe", "-un")
Endif

I like the postmessage option and will look into that further... Sounds so crazy it might just work!

This works, 32792 is decimal for 0x8018

If(WndActive("S2U2")
PostMessage("S2U2",32792,0,0)
EndIf

Or

If(WndActive("S2U2"))
SendSpecial("Right","down")
EndIf

And this will work to refresh the weather image, as someone else had posted.

PostMessage("S2U2",275,1052,0)

and

Well, you guys better check it this way:

If (WindowProcess(ActiveWindow()) eq "s2u2.exe")
PostMessage("S2U2",32792,0,0)
EndIf

as WndActive("S2U2") will return true for any active window name that contains "S2U2", eg. "ScriptsForS2U2" or "S2U2Scripts"

And:

Originally Posted by ladios View Post

Well, you guys better check it this way:

If (WindowProcess(ActiveWindow()) eq "s2u2.exe")
PostMessage("S2U2",32792,0,0)
EndIf

as WndActive("S2U2") will return true for any active window name that contains "S2U2", eg. "ScriptsForS2U2" or "S2U2Scripts"

I've found a way, an drastic one

**************

IF(ProcExists("s2u2.exe"))
Sleep(1000)
Run("\Programas\S2U2\iLock2.exe","-nomsg")
EndIf

blablablabla.....

and at the end of the whole script

IF(ProcExists("s2u2.exe"))
sleep(100)
Exit
Else
Run("\Programas\S2U2\iLock2.exe")
EndIF

What about:

If(( WndActive("S2U2") NOT (WndActive("ScriptsForS2U2") OR WndActive("S2U2Scripts")) )
PostMessage("S2U2",32792,0,0)
EndIf

Isn't

PostMessage("S2U2",32792,0,0)

The same as:

PostMessage("S2U2",32792)

?

Set S2U2 status:

s2u2status = SystemPath("ScriptPath") & "\" & SystemPath("ScriptName") & SystemPath("ScriptExt")
nextrun= TimeStamp() + 30

If(ProcExists("iLock2.exe")=TRUE)
RegWriteString( "HKCU", "Software\SkinZone.org", "s2u2 status", "ON" )
Endif

If(ProcExists("iLock2.exe")=False)
RegWriteString( "HKCU", "Software\SkinZone.org", "s2u2 status", "OFF" )
Endif

RemoveNotifications( s2u2status)
RunAt(nextrun, s2u2status)
exit

Stop & Resume w/S2U2 locked:

energysave=1 -

If this is set to 1 the script will revert your icons to original and exit the script when S2U2 locks the device.

!There is a bug in this function. When using S2U2 to control your volume and/or to answer calls(when not locked). The script will revert your icons to original and exit the script when receiving a call and/or changing volume with s2u2.

I will try to convince A_C to add a "Device is locked" Registry value. If not I don´t see a sollution for this other than not using s2u2 for calls/volume

If (WndActive("S2U2") = 1 and energysave = 1)
Copy( "\iPhoneToday\original.xml", "\iPhoneToday\icons.xml", TRUE )
Delete("\iPhoneToday\original.xml")
RegDelete("HKCU", "\Software\moesfeld\S2PC\", "curtitle")
RegDelete("HKCU", "\Software\moesfeld\S2PC\", "curalbumpic")
RegDelete("HKCU", "\Software\moesfeld\S2PC\", "curalbumorartist")
RunWait("\IPhoneToday\NoPluginsToday.exe")
Run("\IPhoneToday\NoPluginsToday.exe")
If (resumeafterunlock = 1)
if (allsorun ne "\IPhonetoday\S2PC\resume.mscr")
RegWriteString("HKCU", "\Software\moesfeld\S2PC\", "allsorun", allsorun)
else
RegWriteString("HKCU", "\Software\moesfeld\S2PC\", "allsorun", "")
EndIf
RegWriteString("HKCU", "\Software\A_C\S2U2\", "UnlockRunEXE", "\IPhonetoday\S2PC\resume.mscr")
Endif
Exit
Else

WeatherS2U2PWCurrentv3

restarting iLock2, and eventually S2U2, too

s2u2weather + IPhonetoday weather + translation

S2U2 lock/Unlock and playwave+Customizer

S2P has closed, do you want to restart S2U2?

Weather Radar in S2U2

S2U2 Appt Grabber

UserWeather

S2U2 weather script