Related
New Version, v2.3
# v2.3 Minor tweak to allow passing a filename instead of
# naruzo 20080117 an XML string
# Added option to disable string shrinking (shrinkString)
# Added a filter option. filterType can be "include" or "exclude"
#
Click to expand...
Click to collapse
I bundled RSSWeather.mscr (an example script that accesses Yahoo! weather feeds), the readme and the parser into one archive. The only file necessary to use the parser itself is parseXML.mscr.
There is also a new example included in the archive, topStories.mscr, which is a tool to access the Yahoo! top stories news feed (http://rss.news.yahoo.com/rss/topstories) and utilizes the new filterTags functionality to improve performance. The script reads each news item, pulls down the image file from Yahoo!'s site and stores several pieces of information in the registry for use in other scripts/rlToday/etc.
==================================================
Hello there!
I wrote an XML parser for Mortscript. From the synopsis:
parseXML.mscr is an XML parser written in Mortscript.
Writing a custom parser for every application tends to waste a lot of effort and time. Although a custom script for 1 particular application may be faster, parseXML.mscr simply offers a way to parse any XML into an easily accessible data structure with minimum coding/Mortscript experience.
The initial use case was to parse a Yahoo! weather RSS feed for use in my rlToday home screen (RSSWeather.mscr) An example script for parsing the Yahoo! Top Stories feed also exists (topStories.mscr)
parseXML is not staggeringly fast, but several options exist that can improve performance. I have not run it against any particularly hairy XML, but in theory it should be able to handle any well-formed XML.
Click to expand...
Click to collapse
### Output:
The following XML:
<rss version="2.0" >
<channel>
<title>ChannelTitle</title>
<item>
<title>ItemTitle</title>
<description lang="en" country="US">This is the description</description>
</item>
</channel>
</rss><!-- Published by blah 2007 -->
Parses to this data structure:
struct["rss"]["version"] = 2.0
struct["rss"]["channel"]["title"] = ChannelTitle
struct["rss"]["channel"]["item"]["title"] = ItemTitle
struct["rss"]["channel"]["item"]["description"]["lang"] = en
struct["rss"]["channel"]["item"]["description"]["country"] = US
struct["rss"]["channel"]["item"]["description"]["value"] = This is the description
struct["comment"] = Published by blah 2007
Click to expand...
Click to collapse
Enjoy!
thanks
NOw i go tmore idea on how to do other stuff.
v3patel said:
NOw i go tmore idea on how to do other stuff.
Click to expand...
Click to collapse
I hope so!
The parser uses Mortscript 'references' to build the data structure, which are a new (and very handy) feature as of version 4.1, if I remember correctly.
@naruzopsycho:
I'm trying to understand your xml parser and what the output would be. Is the output data written to registry, or to a specific file? Please forgive me my very limited knowledge about mortscript that I'm unable to understand your file completely.
The real use I have for this is to understand the weather cache file for pointUI, which is written in xml format (please refer to the attachment), to read the temperature and weather code and insert those to registry to update the S2U2 user weather as suggested in this thread:
http://forum.xda-developers.com/showthread.php?t=390841
I have posted the same question in the above thread and I think you may have a better idea of how to read the xml file.
Thank you for your help!
With this tool you can lookup CodeSnippets on the Go! Just add them to the Access Database, convert it with the included tool "Code Snippet Creator" and copy it to your Device and start "Code Snippet Viewer"
The Viewer is Tested on my Stock HTC Kaiser - But it should run on any Touchscreen powered WM Device with netcfv2
Code:
Code Snippet Viewer v0.5.1
---
1. Copy the "Release" dir on your Windows Mobile Device with .NETcf2
2. Run "CodeSnippetViewer.exe" on Device
- Version 0.5.1
.Fix
- Version 0.5.0
.Release
Code:
Code Snippet Creator v0.5.0
---
1. Run "csviewer.exe" on Desktop PC
2. Press "Create Database" Button to create "CodeSnippets.txt"
3. Copy "CodeSnippets.txt" to your Device, where "CodeSnippetViewer.exe" is located
The Snippets are read out of the "CodeSnippets.mdb", feel free to add your Snippets there, and Post it on XDA-Developers
- Version 0.5.0
.Release
Download
http://www.scilor.com/codesnippets.html
If you have suggestions to improve this, just post it here!
Space Holder for additional things later on
WOW.. very interessting and helpfull Prog thank you
No Problem, if you have suggestions post it here
what is it for?
sorry for this question im just a newbie,
when i see it right r u german, so pm me pls in german if u can THX!
Ok I don't know exactly what this is for? I wish I did because it looks intriguing.
so what is it for now? can anybody describe it please?
You can create an Access Database for Code Snippets or other things you need to access on the go
then you can convert it and upload it to you phone
Website Added:
http://scilor.sc.funpic.de/codesnippets.html
i have tested your app. but it doesnt work. when i use your sample files, it works, but when i generate a new txt from my mdb, there is an error starting the app. ArgumentOutOfRangeException
here is my exported *.txt. I love this program. great work. i try to sync the mdb with a mysql db in the the net. so i can add new snippets online and sync them back to the device.... i have a cms on my website, where i have some modules which i can use for this. it works also with syntax highligtning (on the net) for some of the programming languages.
Thank you for your feedback, but I have the problem, that it doesnt works in the emulator anymore, I do not know why, it worked before xD
I'll If I can find teh problem.
NEW VERSION
Problem should be fixed!
many thx. i will try this @home, because i am now @work i will try to make an exporter with PHP for my online version to, when i have it done, i can mail them to you. this exporter should be easy to code. i can also make an importer, so that you can import a textfile.
the next idea could it be, that you mobile can add a new recordset with a new snippet, so the sync ist complete... but this only an idea by me...
Here you have the needed code for exporting from SQL to textfile (Routine from the Creator):
I have stripped it down just to show the important things
Code:
oRS.Open "SELECT * FROM CodeSnippets ORDER BY ProgrammingLanguage ASC, Category ASC, UnderCategory ASC", oConn, adOpenKeyset
oRS.MoveFirst
txtData = oRS.RecordCount & vbNewLine
For I = 1 To oRS.RecordCount
TempData = oRS.Fields("ID").Value & ">{.+.}<" & _
oRS.Fields("ProgrammingLanguage").Value & ">{.+.}<" & _
oRS.Fields("Category").Value & ">{.+.}<" & _
oRS.Fields("UnderCategory").Value & ">{.+.}<" & _
oRS.Fields("Snippet").Value
txtData = txtData & Replace(TempData, vbNewLine, ".>-NewLine-<.") & vbNewLine
'This Replaces all linebreaks in the Tempdata and attaches it to txtData and also adds a line break afterwards
oRS.MoveNext
DoEvents
Next
oRS.Close
oConn.Close
Call frmViewer.txt_WriteAll(PathTo & "CodeSnippets.txt", txtData)
Here Is a php I wrote from sketch without testing:
Code:
'Connect to the DB first
$newLine = '
';
'Sry that is a new line I do know if "\n" works instead
$SQLString = "SELECT * FROM CodeSnippets ORDER BY ProgrammingLanguage ASC, Category ASC, UnderCategory ASC";
if ($SQLAnswer = mysql_query($SQLString))
{
$txtData = mysql_num_rows($SQLAnswer).$newLine;
while($row = mysql_fetch_object($SQLAnswer))
{
$TempData = $row->ID.'>{.+.}<';
$TempData .= $row->ProgrammingLanguage.'>{.+.}<';
$TempData .= $row->Category.'>{.+.}<';
$TempData .= $row->UnderCategory.'>{.+.}<';
$TempData .= $row->Snippet;
$txtData .= $newLine.str_replace('.>-NewLine-<.', $newLine, $TempData).$newLine;
}
}
'Write $txtData to a File!
yes this should do the job. i will try it at the weekend. many thx
the rapidshare link show the old version. Can you please update the file or the link?
i have done the online version. there is a *.sql file included, this generates the needed MySQL tables. Also there is a slightly modified *.mdb. i have only modified the Formular.
next there are the needed php an html files for the webserver. the html file is a template, so anyone can modify it.
Update:
i have done some Additions. Included is now EditArea a OpenSource Syntax Highlightning Script. Also i have added a new version of the SQL table, since there is a new field "highlight", this is only for the JavaScript, this field will not be exported in any way.
Now you can manualy add a ProgrammingLanguage or Category by the textfield OR you can choose one from existing Selectbox.
The last time i have forgotten to say, that you must configure the MySQL connection in the common.php. have a look at the following block and put in the right values:
Code:
define("DATABASE_NAME","");
define("DATABASE_USER","");
define("DATABASE_PASSWORD","");
define("DATABASE_HOST","");
Sorry, made a mistake on my website, now it points to the new version
there is no new *.exe file in the zip :-( the directory contains only some txt files :-( please reupload the file.
Sry, here it is again.
Had a problem with my packer
Only for advanced users and ROM cookers. Don't use if you are not sure, what can happen
The main goal to develop HKLM_Init_Clean was to create the tool, which can remove some entries from HKLM/Init in a safe way. For example to remove coldinit.exe (which is required only after the first reboot), and maintain DependXX chain.
By the way, HKLM_Init_Clean checks validity of all entries inside HKLM/Init and cleans errors. It removes LanuchXX entries if they are associated with non existing files, removes DependXX entries if there is no corresponding LaunchXX entry, removes entries from all DependXX, if the associated LaunchXX doesn't exist.
First of all - backup your HKLM/Init.
example:
Code:
HKLM/Init:Launch99="blahblah.exe"
HKLM/Init:Depend100=hex:14,00 ;Let's assume, that there is no Launch100
HKLM/Init:Depend101=hex:63,00 ;hex 63 == dec 99
HKLM/Init:Launch102="xx.exe" ;Let's assume, that there is file \windows\xx.exe
HKLM/Init:Depend102=hex:14,00,63,00 ;Let's assume, that there is valid Launch20 entry (hex 14==dec 20), and there is no valid Launch99 entry (hex 63 == dec 99)
Things, that should be removed are:
Code:
HKLM/Init:Launch99
HKLM/Init:Depend101
and entry 63,00 from HKLM/Init:Depend102
Simply execute HKLM_Init_Clean.exe and compare new HKLM/Init and the original one. Probably you will be surprised.
To remove things from HKLM/Init after reboot:
Put HKLM_Init_Clean.exe into \windows folder
Add something like Launch120="HKLM_Init_Clean.exe". The number have to be greater than removed entry.
Add something like Depend120=hex:15,00 Of course - numbers in LaunchXX and DependXX (in the example: 120) have to be the same. It's good idea to use HKLM_Init_Clean.exe as the last LaunchXX entry
Set Depend120 entries to the numbers of deleted things. One WORD per entry, low byte first. In the example (Depend120"=hex:15,00) (hex 15==dec 21) Launch21 will be removed after the next reboot. You can use as many entries, as you wish - all of them will be removed. Remember - they are WORDs (two bytes), low byte first.
Soft reset.
Verify results.
If everything looks good - you are ready to add HKLM_Init_Clean to the kitchen.
HKLM_Init_Clean is safe for dependency chains.
For example. After:
Code:
Launch1="something1.exe"
Launch2="something2.exe"
Launch3="something3.exe"
Launch120"="HKLM_Init_Clean.exe"
Depend2=hex:01,00
Depend3=hex:02,00
Depend120=hex:02,00
You will get:
Code:
Launch1="something1.exe"
Launch3="something3.exe"
Depend3=hex:01,00
Launch3 depends on removed Launch2, which depends on Lauch1, so after removing Launch2 - Launch3 depends on Launch1
Inside attached archive:
HKLM_Init_Clean.exe - this app
HKLM_Init_Clean.cpp - source (ugly and dirty)
HKLM_Init_Clean_sample.reg - sample reg file
HKLM_Init_Launcher.exe - exactly the same as InitLauncher (see http://forum.xda-developers.com/showthread.php?t=302013)
All executables are not signed, not UPXed, not converted into modules - do it yourself.
Ha, great tool, now we can make it really easy Thanks for that, bro!
Now... off to testing
Please masters,,helpppp
Hey Guys, sorry for my english, I changed the HKLM/Init:Launch50="YFLoader.exe"
to the
HKLM/Init:Launch99="explorer.exe"
Then My PNA worked As Windows CE 4.2,,,
But Of course i didnt hold myself, and i deleted exlorer.exe file from the PNA,
So When i open my PNA,THERE IS NOTHING. Because of the absence of explorer.exe, i cant copy it back,because i lost the connection between computer and PNA..... OHH MY GODNESS...
MY QUESTION : HOW TO TURN IT TO NORMAL, I CANT CONTACT IT WITH ACTIVESYNC, OR HOW I CAN MAKE MY PNA START ON MEMORY CARD, TO I TURN EVERYTHING TO NORMAL...
PLEASE REPLY ME, I WAIT NEAR COMPUTER WITH REAL STRESS
THANKS..
I have this problem to
I have a PNA with Win CE5; I modified the register and now I can not connect my PNA to PC and card...
If it exists a program to connect to my PNA please write to me. Or if it is a possibility to change the register from my PNA.
i have the architecture of the good regitry.
I am waiting for your answere.
Please help me!
Is a bit FUN the GUY wrote you : Only for advanced users and ROM cookers. Don't use if you are not sure, what can happen
But nobody Listen I don`t think im so advanced user and for this reason will nost test it.
IMO, this would be a great thing to run at the end of UC :-D
I would think someone could accomplish the same thing with a mortscript or AHK script though.
Hi everyone,
Since this morning I decided to find a way to bypass inabilty to set MMS properties.
When I'll completly figure how to modify this settings I will develop an application where you will be able to put all the settings to set correctly the MMS APN.
So, I've started to investigate on my phone this morning, and I already found that.
It seems profiles are stocked in HKCU\Software\Microsoft\ShortMsg\MMS\Profiles\
Active profile is set as String in that key : HKCU\Software\Microsoft\ShortMsg\MMS\Active
Inside this Key, there is a Key for each profiles saved.
For my case, there is a key called "ORG-FR-APP". Inside this key, I can found this value :
TO-NAPID : String (Default Value = MMSAPN in my case)
TO-PROXY : String (Default Value = MMSPROXY in my case)
ADDR : String (Default value = http://mms.orange.fr in my case)
MS : DWORD (Default Value is 300).
I decide to modify value in registry trough MFG and I finally got that :
Before : http://attachments.xda-developers.com/attachment.php?attachmentid=880724&stc=1&d=1328002843
After : http://attachments.xda-developers.com/attachment.php?attachmentid=880725&stc=1&d=1328002843
The TO-NAPID and the TO-PROXY value seems to be linked to something I can see in "View config XML" but I don't know where I can edit them.
In deed, If I can edit them, the problem will be completely solved.
Here, the two screenshots which made me believe that the TO-NAPID and the TO-PROXY value are linked to something else in the file :
http://attachments.xda-developers.com/attachment.php?attachmentid=880724&stc=1&d=1328003211
http://attachments.xda-developers.com/attachment.php?attachmentid=880725&stc=1&d=1328003211
If someone know how to modify the set of values for NAPDEF and PXLOGICAL, I'm ready to do the software .
It's inside a XML File, somewhere in the phone.
I'll posting here if something new happens.
I'm gussing you've read through this already, but if not, I'm sure it could be of some help. http://msdn.microsoft.com/en-us/library/bb737506.aspx
I went trough a similar path trying registry edits through LG's MFG app and using the program DiagProvXML to try and push my own non-registry changes... but to no avail unfortunately. Hopefully, you'll be able to program something that works.
It really is too bad we can not just write to the Windows directory and simply add/edit the carrier __PROV_*.XML files directly.
Just in case anyone is tracking this thread, you can now use HeathCliff's WP7 Root Tools to copy the appropriate XML files to the windows directory and enable MMS on ROMs with Internet Sharing, that lack the correct carrier settings. Let me know if you need specifics on how to make this work.
I am interested in this. Would be useful for others coming from google in future.
yeah, would love to get those informations, too, sonus.
thanks a lot in advance
Sorry, for the delayed response. I had not tracked this thread. Have you guys tried the "LG Network Setup App"? One forum member reports that he was able to select his network from that marketplace app and enable MMS specific to his carrier. That's the easiest way to do this.
Otherwise, the general steps are
1. Unlock your phone using MFG (plenty of threads outline this, so do a search)
2. Install Heathclif''s WP7 Root Tools using "Windows Phone Device Manager", "Windows Phone Power Tools", or any way you can think of to copy the XAP install file for Heathclif's WP7 Root Tools onto your phone.
3. Copy the two relevant to your provider PROV XML files from the attached zip and the Mail Provider XML file to your windows directory using WP7 Root tools on the phone. The files are sorted by carrier_country_MCC or MNC code. There's a wikipedia page with all the providers and their respective MCC/MNC codes, I had linked to it in one of my posts on MCC a while back. If your carrier doesn't have a file, try using one of these files as a template to make a file for your carrier
4. Use MFG to select your XML file (MFG>>Engineer Menu>>Other Settings>>Set network Profiles>> Search for the MNC or MCC for your provider (it searches according to filename)
http://depositfiles.com/files/xebamjoer
http://depositfiles.com/files/a8xl7r9wz
Hello
I created an app to use the IR of the S4s as remote control, to obtain the hex codes, I write a python script that clones the DB of WhatON (PEEL).
The APP: github.com User:construidor repository:IrDude, I Can't Post Links
The script to create the database is on "assets" folder (It's slow).
Can I use this database (or is illegal)? Can I post this app with DB here on XDA?
Sorry I'm a noob.