is there an (simple) way to get the gps data with mortscript? Or maybee to get it out from iGO8 with mortscript?
what I'd like to try is to get accurate weatherinfo depending on the current location:
I have:
http://ws.geonames.org/findNearbyPostalCodes?lat=48.208333&lng=16.373056
for example. this would give you the next bigger cities, country, ...
With this info it should be possible to get the correct Code for the Forecast (for example here)
http://api.wunderground.com/auto/wui/geo/WXCurrentObXML/index.xml?query=wien
as I'm playing around with this script for some time now
http://forum.xda-developers.com/showthread.php?t=358952
I'd like to build this (maybe completly useless) thing to it ...
Any help is highly appreciated!
I've found this script somewhere on the net, so it's not mine but I can't remember who give right credits :/
However I hope it can be useful for you:
-------------------------
Port = "COM6:"
NbOctet=4096
SetComInfo(Port,2000,4800,"none",8,1,"None")
i=0
while ( i<3 )
nmea = Readfile( Port,NbOctet )
start=Find(nmea,"$GPRMC")
if(start>0)
#end=Find(nmea,"$G",start)
end=start+100
gprmc=SubStr(nmea,start,end)
parts=Split(gprmc,",")
lat1=parts[4]
lat2=SubStr(lat1,3)/60
lat3=SubStr(lat1,1,2)
lat=lat2+lat3
if(Find(parts[5],"S"))
lat="-"&lat
endif
lon1=parts[6]
lon2=SubStr(lon1,4)/60
lon3=SubStr(lon1,1,3)
lon=lon2+lon3
if(Find(parts[7],"W"))
lon="-"&lon
endif
time=format(parts[2],0)
speed=format(parts[8]*1.151,1)
track=format(parts[9],0)
date=parts[10]
#stop loop
i=4
endif
i=i+1
endwhile
message("lat"&lat&"^LF^lon"&lon&"^LF^speed"&speed&"mph^LF^track"&track&"deg^LF^date"&date&"^LF^time"&time,"GPS Done")
Here is my PicGrab Script. It will automatically download some nice (hard****) erotic Pictures for you every day. In detail, it does the following when you execute it:
1.) It enables and connects your Wireless Lan
2.) It checks if there are new Picture Galleries available
3.) If yes, it will download the newest Galleries to your Storage Card
4.) After completion, it will disable Wlan again
5.) It will launch every 24 hours later, so you receive autmatically new girls every day.
UPDATE
I attached a second Version of the Script below. It does not use your Wlan connection, instead it uses the GSM Network.
Watch out, this can become very expensive for you if you have a bad dataplan, because there will be downloaded some MB of data!
Here you can have a look at the Script for Connection over Wlan:
Code:
### Picture Grabber Script by Stronzo ###
errorlevel syntax
toggledisplay(on)
### In the next 2 lines you define the location of the Script. Default is the root of the Storage card.
### The script will run every 24 hours (86400 seconds). You can change the value below if you want.
RemoveNotifications( "\Storage Card\picgrab.mscr" )
runat (timestamp()+86400, "\Storage Card\picgrab.mscr")
Run("\Windows\CommManager.exe")
sleep(4000)
### Depending on how your CommManager looks like (wlan button position)
### you will have to replace the 410 with something like 460.
mouseClick(460,410)
sleep( 18000 )
kill("CommManager.exe")
z = 0
y = 0
while (z = 0)
### In the following line, replace the IP with the IP of your Router. This way you can check if your Wlan is connected.
### If you dont have a router you can enter for example http://www.google.com,
### but this will indicate true even if you are connected via GRPS or 3G and may become expensive
z = InternetConnected("http://192.168.0.100")
Sleep(3000)
toggledisplay(on)
y = y+1
if (y = 12)
sleepmessage(5, "No Connection to WLAN!",1)
call gooff
endif
endwhile
sleepmessage(3, "Connected to WLAN","",1)
mkdir("\Storage Card\pics\")
download( "http://www.kindgirls.com/archive.php", "\Storage Card\pics\archive.xml")
read = readfile( "\Storage Card\pics\archive.xml")
existalready = fileexists( "\Storage Card\pics\already.txt")
if (existalready=FALSE)
writefile("\Storage Card\pics\already.txt", y)
endif
readalready = readfile( "\Storage Card\pics\already.txt")
x = 1
t = formattime( "Y.m.d" )
d = "\Storage Card\pics\"&t&"\"
found = 0
while (x < 13)
search = find( read, "galh450p", found+10)
found = search
if (search = 0)
sleepmessage (2, "Found nothing new")
call gooff
else
cut = substr( read, search, 30)
s = part( cut, "/", 2)
searchalready = find( readalready, s)
if (searchalready = 0)
sleepmessage (1, "New Dataset found, downloading...")
mkdir( d )
writefile("\Storage Card\pics\already.txt", s, TRUE)
a = "http://www.kindgirls.com/galh450p/"
a2 = "/"
a3 = "_"
e = 1
f = "\Storage Card\pics\"
h = ".jpg"
while (e < 20)
download(a&s&a2&s&a3&e&h, d&s&e&h)
size = filesize(d&s&e&h)
if (size < 15000)
delete(d&s&e&h)
endif
e=(e+1)
toggledisplay(on)
endwhile
e = 1
else
sleepmessage (1, "We already have this, skipping..")
x = (x+1)
endif
endif
endwhile
sleepmessage(3, "Finished completely")
sub gooff
toggledisplay(on)
Run("\Windows\CommManager.exe")
sleep(4000)
### Depending on how your CommManager looks like (wlan button position)
### you will have to replace the 410 with something like 460.
mouseClick(460,410)
sleep( 3000 )
kill("CommManager.exe")
sleepmessage(3, "Disconnected",1)
toggledisplay(off)
exit
endsub
What you need to get it running:
1.) Install Mortscript ( if you dont have it already).
Available here for free http://mort.sto-helit.de/index.php?module=download&action=view&entry=65
2.) Download my Script from the attachment or the Code above. Save it to the root of your Storage Card. Make sure it has the Name picgrab.mscr
3.) Execute the Script and wait till the magic is done (the screen turns off in the end). You will find the pictures in your Storage Card in the folder pics. The Script will run again in 24 hours automatically after you executed it.
IMPORTANT:
Read the Commented Lines in the Script, it may be necessary to fit some lines to your device to make it working ok on your device.
Select the Script you want, either Wlan or GSM.
Have fun!
Nice Idea ...
... but it would be even nicer to mention that these is pretty HARD!
Please remember ... married men could get in trouble!
Kids also have access to this site and apps provided here!
So please ... add at least a warning!!
I think everyone who is able to read will know what he will get. I cant be responsible for a married man downloading this and getting caught by his wife
Hi,
please enable GSM Network.
with friendly greet
starbase64
What do you exactly mean?
do you want to get the files without connecting to wlan?
str0nz0 said:
do you want to get the files without connecting to wlan?
Click to expand...
Click to collapse
Yes, download the new girl via GSM.
Your wish is fullfilled
Youre Script just downloaded 15 MB (72 pictures) in the firsttime run......
Too much for me!
Daily updates vary between 1 and 3 Sets, every has ~14 pics.
On the first run it may download more, but this is only on the first run!
Interesting
What about ActiveSync? Is it possible to have version which check new pictures and download them if there are any during the synchronization? (Like downloading new weather)
Thank you
theTransporter said:
Youre Script just downloaded 15 MB (72 pictures) in the firsttime run......
Too much for me!
Click to expand...
Click to collapse
I have unlimited datentransfer, it is therefore no problem.
Edit: the gsm version works very well
ha ha ha.... u made me laugh man... but gr8 idea...
Hi,
the script freezes when the device in the standby.
Can you change it so that it runs in standby?
I use the GSM version.
with friendly greet
starbase64
starbase64 said:
Hi,
the script freezes when the device in the standby.
Can you change it so that it runs in standby?
I use the GSM version.
with friendly greet
starbase64
Click to expand...
Click to collapse
There is nothing i can do, because its a setting in your phone. Normally GSM connections are kept alive when device goes to standby. Yours seem to disable data connection. You can change this setting with different tools, for example HD Tweak.
str0nz0 said:
for example HD Tweak.
Click to expand...
Click to collapse
i use HD Tweak, to set my internet connection always on
Work on pro
Will it wok on my pro thanks
Revin said:
Interesting
What about ActiveSync? Is it possible to have version which check new pictures and download them if there are any during the synchronization? (Like downloading new weather)
Thank you
Click to expand...
Click to collapse
I will have a look at that, maybe in a next version.
starbase64 said:
i use HD Tweak, to set my internet connection always on
Click to expand...
Click to collapse
You can try to set your timeout of your display standby for some more minutes. That should work.
jr5416 said:
Will it wok on my pro thanks
Click to expand...
Click to collapse
Just try it, the GSM Version will surely work, the Wlan Version has to be configfured correctly by you to enable Wlan. I have commented the lines in the Script. The main important thing are the two lines with the "mouseClick(460,410)" in the beginning and in the end. You have to set the correct coordinates where your Wlan Button is in the comm manager.
I have unlimited data too.
But are there every day 15 MB to download or only for the first run?
theTransporter said:
I have unlimited data too.
But are there every day 15 MB to download or only for the first run?
Click to expand...
Click to collapse
Only on the first run. And it depends when your first run is. In the worst case it will load 12 sets with 15 pics with ~200kb per pic, that means 36MB. But this is only true for the first run.
Like i said after the first run you get every day 1-3 sets, which means 3-9mb of data.
str0nz0 said:
You can try to set your timeout of your display standby for some more minutes. That should work.
Click to expand...
Click to collapse
TimeOut toggle with MortScript:
Code:
### deactivate Display timeout and Standby
RegWriteDWord("HKCU", "ControlPanel\BackLight" & nbURL , "ACTimeout", "00000000")
RegWriteDWord("HKCU", "ControlPanel\BackLight" & nbURL , "BatteryTimeout", "00000000")
RegWriteDWord("HKCU", "ControlPanel\BackLight" & nbURL , "ACTimeoutUnchecked", "0000003c")
RegWriteDWord("HKCU", "ControlPanel\BackLight" & nbURL , "BatteryTimeoutUnchecked", "0000001e")
RegWriteDWord("HKLM", "System\CurrentControlSet\Control\Power\Timeouts" & nbURL , "ACSuspendTimeout", "00000000")
RegWriteDWord("HKLM", "System\CurrentControlSet\Control\Power\Timeouts" & nbURL , "BattSuspendTimeout", "00000000")
### activate Display timeout and Standby
RegWriteDWord("HKCU", "ControlPanel\BackLight" & nbURL , "ACTimeout", "0000003c")
RegWriteDWord("HKCU", "ControlPanel\BackLight" & nbURL , "BatteryTimeout", "0000001e")
RegWriteDWord("HKCU", "ControlPanel\BackLight" & nbURL , "ACTimeoutUnchecked", "00000000")
RegWriteDWord("HKCU", "ControlPanel\BackLight" & nbURL , "BatteryTimeoutUnchecked", "00000000")
RegWriteDWord("HKLM", "System\CurrentControlSet\Control\Power\Timeouts" & nbURL , "ACSuspendTimeout", "00000708")
RegWriteDWord("HKLM", "System\CurrentControlSet\Control\Power\Timeouts" & nbURL , "BattSuspendTimeout", "0000003c")
I use it, works fine. (past in your script)
with friendly greet
starbase64
Hi,
My PNA is a windows mobile based Sony NAV-U which has 2 different navigation apps installed on the resident flash.
I asked this question on a PNA Forum...but was asked to try asking on an xda-developers forum so here I am.
I'm looking for advise on how I can set up my PNA so that on switching it on, I'm asked to choose which of the 2 navigation apps currentl installed on I wish to run.
Whether that is by a prompt on screen or a sequential choice so that cancelling the first choice would trigger the second one to run, else the first would be triggered.
I'm no programmer but if someone here has the knowledge of which script lines to insert into the mav-u.mscr file to allow this, it would be hugely appreciated.
I hope I can find the answer here.
Many, many thanks in advance.
Tee_J
Contents of current nav-u mscr file follow:
RegWriteDword ("HKCU", "ControlPanel\Volume", "Mute", 5)
Kill ("SonyCalibMan.exe")
Close("SonyAppMan")
Copy("\Mounted Volume\Sony\nav-u\MortScript.exe","\Windows\MortScript.exe")
Copy("\Mounted Volume\Sony\nav-u\toolhelp.dll","\Windows\toolhelp.dll")
Copy("\Mounted Volume\Sony\nav-u\TestMode.exe","\Windows\TestMode.exe")
Copy("\Mounted Volume\Sony\nav-u\PowerOn.mscr","\Windows\PowerOn.mscr")
RunOnPowerOn ("\Windows\MortScript.exe","\Windows\PowerOn.mscr" )
RunWait("\Mounted Volume\Sony\nav-u\ToolDevice.exe","off 18")
RunWait("\Mounted Volume\Sony\nav-u\ToolDevice.exe","off 15")
RunWait("\Mounted Volume\Sony\nav-u\ToolDevice.exe","on Serial")
Run ("\Windows\TestMode.exe")
Sleep (50)
Kill ("TestMode.exe")
While (TRUE)
RunWait ("\Mounted Volume\Primo2\Primo.exe")
PowerOff
EndWhile
I wanted to make a note to myself on how to automate a night mode that removes blue light on the display similar to the program f.lux or linux's redshift.
The whole idea is blue light occurs naturally in the daytime but at night it may cause eyestrain & keep you awake longer than when those color temperatures are not visible. Take it with a grain of salt but I've used those apps ever since I found out about them & it does make a screen easier on the eyes at night.
If you have a Cyanogenmod ROM on your phone you can create a Tasker profile (or use some other phone automation app that supports terminal commands as root) to adjust the RenderFX option in cyanogenmod settings/Interface/Render Effects.
A few days ago I wondered if someone knew of a way to execute changing the RenderFX from a terminal so I could automate a color-change and bling right here.
am startservice -n com.cyanogenmod.cmparts/com.cyanogenmod.cmparts.services.RenderFXService --ei widget_render_effect N
*Where N is an integer in this list:
#define RENDER_EFFECT_NIGHT 1
#define RENDER_EFFECT_TERMINAL 2
#define RENDER_EFFECT_BLUE 3
#define RENDER_EFFECT_AMBER 4
#define RENDER_EFFECT_SALMON 5
#define RENDER_EFFECT_FUSCIA 6
#define RENDER_EFFECT_N1_CALIBRATED_N 7
#define RENDER_EFFECT_N1_CALIBRATED_R 8
#define RENDER_EFFECT_N1_CALIBRATED_C 9
#define RENDER_EFFECT_RED 10 If you want to "go back to normal", use N=7.
Well, that was fun. Use that shell line in a root shell in an action in Tasker, and voilà, you got a tasker-controlled Render Effect. Cool!
-Credit: Matthieu Berthomé
Click to expand...
Click to collapse
So that's from that Cyanogenmod forum post. Credits to them for digging this up.
For Tasker I created a profile that runs at 10pm, as the Action I used Script/Run Shell and for the command I used "am startservice -n com.cyanogenmod.cmparts/com.cyanogenmod.cmparts.services.RenderFXService --ei widget_render_effect 1" (without quotes) & check the use root checkbox to put the phone into night mode.
Then at, say, 5am, a corresponding task that sets it back to 7.
It'd be nice if it was a gradual change like f.lux & redshift do but it's good enough for me.
Thanks to those who figured it out.
[email protected]
Thanks, I use it everyday to change my render effects with LMT.
Ok, this took me a while to figure out. Apparently you need to have device debugging switched on in order to be able to successfully run any am command. At least from my phone... (HTC Desire CM7.1 Android 2.3)