Sign in to follow this  
Followers 0
boltc

new update avaible doesnt work

10 posts in this topic

i stole this script from rishodis pindlebot

why does this not work?, i have only this: (no include or something)

Global $version
$version = "2.1"

If (MyIniRead("settings.ini", "settings", "UpdateNotify", "1") = 1) Then
    URLDownloadToFile("http://home.planet.nl/~****/version.txt", "version.txt")
    MySleep(100)
    $versionFile = FileOpen("version.txt", 0)
    If NOT ($versionFile = -1) Then
        $newestVersion = FileReadLine($versionFile, 1)
        If NOT ($newestVersion  = $version) Then
            $update = MsgBox(64, "my prog v" & $version, "A newer version (v" & $newestVersion & ") is available for download at http://www.***.com")
        EndIf
        FileClose("version.txt")
    EndIf
    FileDelete("version.txt")
EndIf

the report:

C:\Documents and Settings\Nieuwe bo\Mijn documenten\Nieuwe map (2)\eh\test\test.au3(6,58) : ERROR: MyIniRead(): undefined function.

If (MyIniRead("advanced.ini", "Misc", "UpdateNotify", "1")

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Documents and Settings\Nieuwe bo\Mijn documenten\Nieuwe map (2)\eh\test\test.au3(8,79) : ERROR: URLDownloadToFile(): undefined function.

URLDownloadToFile("http://www.res-osc.com/diablo2/version.txt", "version.txt")

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Documents and Settings\Nieuwe bo\Mijn documenten\Nieuwe map (2)\eh\test\test.au3(9,13) : ERROR: MySleep(): undefined function.

MySleep(100)

~~~~~~~~~~~^

C:\Documents and Settings\Nieuwe bo\Mijn documenten\Nieuwe map (2)\eh\test\test.au3 - 3 error(s), 0 warning(s)

>AU3Check Ended with Error(s).

>Running: (3.1.1.0):C:\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\Nieuwe bo\Mijn documenten\Nieuwe map (2)\eh\test\test.au3"

C:\Documents and Settings\Nieuwe bo\Mijn documenten\Nieuwe map (2)\eh\test\test.au3 (6) : ==> Unknown function name.:

If (MyIniRead("advanced.ini", "Misc", "UpdateNotify", "1") = 1) Then

If (^ ERROR

Share this post


Link to post
Share on other sites



i stole this script from rishodis pindlebot

why does this not work?, i have only this: (no include or something)

he report:

C:\Documents and Settings\Nieuwe bo\Mijn documenten\Nieuwe map (2)\eh\test\test.au3(6,58) : ERROR: MyIniRead(): undefined function.

If (MyIniRead("advanced.ini", "Misc", "UpdateNotify", "1")

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Documents and Settings\Nieuwe bo\Mijn documenten\Nieuwe map (2)\eh\test\test.au3(8,79) : ERROR: URLDownloadToFile(): undefined function.

URLDownloadToFile("http://www.res-osc.com/diablo2/version.txt", "version.txt")

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Documents and Settings\Nieuwe bo\Mijn documenten\Nieuwe map (2)\eh\test\test.au3(9,13) : ERROR: MySleep(): undefined function.

MySleep(100)

~~~~~~~~~~~^

C:\Documents and Settings\Nieuwe bo\Mijn documenten\Nieuwe map (2)\eh\test\test.au3 - 3 error(s), 0 warning(s)

>AU3Check Ended with Error(s).

>Running: (3.1.1.0):C:\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\Nieuwe bo\Mijn documenten\Nieuwe map (2)\eh\test\test.au3"

C:\Documents and Settings\Nieuwe bo\Mijn documenten\Nieuwe map (2)\eh\test\test.au3 (6) : ==> Unknown function name.:

If (MyIniRead("advanced.ini", "Misc", "UpdateNotify", "1") = 1) Then

If (^ ERROR

You have posted the reasons already ;)

This part of script uses functions, which are definded elsewhere.

You only have to read the report :P

Share this post


Link to post
Share on other sites

i stole this script from rishodis pindlebot

::

MyIniRead(): undefined function.

URLDownloadToFile(): undefined function.

MySleep(): undefined function.

hmm... what's the meaning of "undefined function" ? I guess it is unknown. Why is it unknown? Maybe because it is not defined? But, why is it not defined? Because you forgot to steal it. Go back and steal the full source code. Then it will work.

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

how can i fast find the other codes to run that script?

Share this post


Link to post
Share on other sites

how can i fast find the other codes to run that script?

hmmm.... write it on your own ;)

Share this post


Link to post
Share on other sites

how can i fast find the other codes to run that script?

you can't!

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

how can i fast find the other codes to run that script?

A better question would be: How fast can you learn to write your own?

If you want to learn, we're here to help.

If you don't, then look for stolen code elsewhere.


[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Share this post


Link to post
Share on other sites

do someone know the working code of this?

URLDownloadToFile("http://www.res-osc.com/diablo2/version.txt", "version.txt")

Share this post


Link to post
Share on other sites

My dear Gypsy friend.

I know your family is hungry.

Yes, I will give you money to buy a meal for all of you, for the rest of the week, as long as you work in the field for me today, and I will also show you how to grow your own food, as I do mine.

No I will not help you steal for it, for you will have to steal again tomorrow.

So the answer to your last question is YES, and the answer to your next question is NO!

Share this post


Link to post
Share on other sites

this works now

If (IniRead("settings.ini", "settings", "UpdateNotify", "1") = 1) Then
    InetGet("http://home.***.nl/~***/version.txt", "version.txt")
    Sleep(100)
    $versionFile = FileOpen("version.txt", 0)
    If Not ($versionFile = -1) Then
        $newestVersion = FileReadLine($versionFile, 1)
        If Not ($newestVersion  = $version) Then
            MsgBox( 0, "EH", "You are running v" & $version & ". There is a new update avaible: v" & $newestVersion & "!!")
            $update = GUICtrlCreateButton("Close", 46, 105, 307, 21, $BS_BITMAP + $BS_FLAT)
            $update = GUICtrlSetImage(-1, @ScriptDir & "\data\Red.bmp", -1)
        EndIf
        FileClose("version.txt")
    EndIf
    FileDelete("version.txt")
EndIf

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  
Followers 0