Jump to content
Sign in to follow this  
James

Read a .ini from a website

Recommended Posts

James

I'm hoping this will be my last question for today.

I have put a .ini file on my website:

[Version]Newest=2.0

It's called version.in

Now how would I read what version is the latest from that. I need to get the 2.0 bit and use GuiCtrlSetData to change the text to the version.

Thanks

Secure

Share this post


Link to post
Share on other sites
Jos

I'm hoping this will be my last question for today.

I have put a .ini file on my website:

It's called version.in

Now how would I read what version is the latest from that. I need to get the 2.0 bit and use GuiCtrlSetData to change the text to the version.

Thanks

Secure

First IniGet() it to the @TempDir before reading ....

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
James

I have tried

Func FirstRun()
    RegRead("HKEY_CURRENT_USER\Software\BetaPad\Settings", "FirstRun")
    If @error Then
        GuiCtrlSetData($DocEd1, "Welcome to BetaPad. It looks like this is your first time running BetaPad." & @CRLF & @CRLF & _
        "You are using; " & $Version & " of BetaPad." "Our newest version is: " & InetGet("http://betapad.sf.net/version.ini", @ScriptDir "\Settings\version.ini") & IniRead(@ScriptDir "\Settings\version.ini", "Version", "Newest", "")
        RegWrite("HKEY_CURRENT_USER\Software\BetaPad\Settings", "FirstRun", "REG_SZ", "Ranb4")
    EndIf
EndFunc

I dont know how to read the version number (2.0)

Share this post


Link to post
Share on other sites
Jos

I have tried

Func FirstRun()
    RegRead("HKEY_CURRENT_USER\Software\BetaPad\Settings", "FirstRun")
    If @error Then
        GuiCtrlSetData($DocEd1, "Welcome to BetaPad. It looks like this is your first time running BetaPad." & @CRLF & @CRLF & _
        "You are using; " & $Version & " of BetaPad." "Our newest version is: " & InetGet("http://betapad.sf.net/version.ini", @ScriptDir "\Settings\version.ini") & IniRead(@ScriptDir "\Settings\version.ini", "Version", "Newest", "")
        RegWrite("HKEY_CURRENT_USER\Software\BetaPad\Settings", "FirstRun", "REG_SZ", "Ranb4")
    EndIf
EndFunc

I dont know how to read the version number (2.0)

Split it up in separate lines and start testing thing before posting that it doesn;t work ...

InetGet

IniRead

GuiCtrlSetData

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.