A newbie question - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Thread: A newbie question (/showthread.php?tid=92096) A newbie question by chrisb on 09-03-2009 at 10:58 AM
I have a question regarding the ability to read text files, I have a text file however I am getting the error code: And the code I am using is code: RE: A newbie question by matty on 09-03-2009 at 12:19 PM FileSystemObject can only read local files. Therefore you have 2 options. Firstly you can use URLDownloadToFile to download the text file and then you can read it locally. Second option is to use ajax, an example can be found here -dt-'s reply to Tips. RE: A newbie question by chrisb on 09-03-2009 at 02:43 PM i went for the AJAX option, thanks! I also wanted to know, how do I create the option windows such as for setting variables? RE: A newbie question by matty on 09-03-2009 at 03:00 PM Take a look at the scripting document. It provides examples. They are made in XML. RE: A newbie question by chrisb on 09-03-2009 at 03:28 PM Okay i have found that now, one last question. How can I store information such as a perticular variable so that it is remembered for next time. I can't seem to find it in the documentation. RE: A newbie question by matty on 09-03-2009 at 03:32 PM
There isn't a defined way. The developer can decide how they want to do that. Could be any of the following and then some:
That is all up to you as the developer. RE: A newbie question by chrisb on 09-03-2009 at 03:34 PM Oh wow, such choice , I will take a look in the jScript documentation for that. Thanks a bunch matty, you have been a big help! RE: A newbie question by chrisb on 09-03-2009 at 03:45 PM
Could you just tell me what the following should be, I know I have done it wrong... RE: A newbie question by matty on 09-03-2009 at 03:48 PM
quote:The JScript documentation won't give you all the information you need. I attached a registry script I wrote for easy access to the registry. A database is just too much work for a script and not worth the effort. This leaves you with XML and INI files. INI files use the following functions: GetPrivateProfileString WritePrivateProfileString GetPrivateProfileInt As for XML there is lots of information out on the internet about it. quote:GetControlText is a function of the Plus! Window. Therefore when you open the window you need to assign it to a variable for later use. The following is simply an example and shouldn't be used for larger scripts with multiple windows js code: RE: A newbie question by chrisb on 09-03-2009 at 03:50 PM Thanks, that worked RE: A newbie question by chrisb on 09-03-2009 at 04:11 PM
function OnEvent_Timer("getTweets") { RE: A newbie question by chrisb on 09-03-2009 at 04:37 PM MsgPlus.AddTimer("getTweets", 5000) RE: A newbie question by Matti on 09-03-2009 at 05:00 PM
quote:A function definition has the following form: js code:The error in your code is that you're giving a value instead of a variable name where your parameters go. This is faulty programming logic and therefore invalid JScript and should be corrected like so: js code:
RE: A newbie question by chrisb on 09-03-2009 at 05:04 PM
Error: 'timerID' is undefined (code: -2146823279) RE: A newbie question by chrisb on 09-03-2009 at 05:06 PM Oh I got why not , false alarm. Thanks RE: A newbie question by chrisb on 09-05-2009 at 04:25 PM I can't seem to find how to do an ini file save and load, could you give me an example? |