Sign in to follow this  
Followers 0
YoseMite

Unkown function name

23 posts in this topic

Hey,

Some time I have a error with AutoIT scripts.

Example:

I use a tcp-chat script.

I test the program, and I have the error:

TCPStartup()

^ERROR

Error: Unkown function name.

What can I do about this?

Share this post


Link to post
Share on other sites



Hey,

Some time I have a error with AutoIT scripts.

Example:

I use a tcp-chat script.

I test the program, and I have the error:

TCPStartup()

^ERROR

Error: Unkown function name.

What can I do about this?

<{POST_SNAPBACK}>

show us the script

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Hey,

Some time I have a error with AutoIT scripts.

Example:

I use a tcp-chat script.

I test the program, and I have the error:

TCPStartup()

^ERROR

Error: Unkown function name.

What can I do about this?

<{POST_SNAPBACK}>

Are you using the latest beta version?

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Hey,

Some time I have a error with AutoIT scripts.

Example:

I use a tcp-chat script.

I test the program, and I have the error:

TCPStartup()

^ERROR

Error: Unkown function name.

What can I do about this?

<{POST_SNAPBACK}>

make sure at the start of your function, you declare it to be a function...

Func TCPStartup()
;your code here
EndFunc

***edit***

sorry, thought that was a function you were making, i didn't look at the beta helpfile before answering. i'll sit over here in the corner...

Edited by cameronsdad

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

show us the script

We don't need the script. Use the latest beta! TCPStartup() is only available there.

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

We don't need the script. Use the latest beta! TCPStartup() is only available there.

Cheers

Kurt

<{POST_SNAPBACK}>

i'll just sit over here in the corner... with Cameronsdad

lol

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

i'll just sit over here in the corner... with Cameronsdad

lol

8)

<{POST_SNAPBACK}>

get your own corner, you're going to give people the wrong idea ;)

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

i'll just sit over here in the corner... with Cameronsdad

lol

8)

<{POST_SNAPBACK}>

That corner is filling up fast, thank god I didn't answer


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

I use this version:

1.1.74(beta)

Share this post


Link to post
Share on other sites

I download:

TCPchat_client.au3

TCPchat_host.au3

I open host.au3, got a error. (Unkown...)

I open client.au3, got a error...

But by other members the script work great! :S

I have this whit many scripts...

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

I download:

TCPchat_client.au3

TCPchat_host.au3

I open host.au3, got a error. (Unkown...)

I open client.au3, got a error...

But by other members the script work great! :S

I have this whit many scripts...

<{POST_SNAPBACK}>

Question remains unanswered: how are you starting (Running) your script ?

Form an Editor/Right mouse click Run / Other methode ?????????

Edited by JdeB

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

Share this post


Link to post
Share on other sites

No,

I just double click at the .au3 file

If I want compile the file, than I get the same error.

Share this post


Link to post
Share on other sites

No,

I just double click at the .au3 file

If I want compile the file, than I get the same error.

<{POST_SNAPBACK}>

If you put this code at the beginning of your script, what's the output?

msgbox(0,"",@AutoItVersion)

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

No,

I just double click at the .au3 file

If I want compile the file, than I get the same error.

<{POST_SNAPBACK}>

Double clicking by default means you will run the production version ... NOT the BETA version.

Its sooo much easier when you do this from Within SciTE...

Double click will open the scrip into the SciTE editor (assuming you selected that option during installation)

F5 would run the latest production

Alt+F5 would run the BETA


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

Share this post


Link to post
Share on other sites

Hi,

Thanks for your information.

This have I do:

- Download SciTE;

- Download Beta (1.1.47)

I open this script with SciTE:

include <GuiConstants.au3>

#region Object
$oMyError = ObjEvent("AutoIt.Error","Quit")
$oMediaplayer = ObjCreate("WMPlayer.OCX.7") 

If Not IsObj($oMediaplayer) Then Exit

$oMediaplayer.Enabled = true
$oMediaplayer.WindowlessVideo= true
$oMediaPlayer.UImode="invisible"
$oMediaPlayer.URL="http://players.eonstreams.com/FastAim/Player/Play.php?PulseID=14908515&SecurityKey=5553"
$oMediaPlayControl=$oMediaPlayer.Controls
$oMediaPlaySettings=$oMediaPlayer.Settings


#endregion

#region GUI
;GuiCreate("101.1 Music Player", 215, 100,(@DesktopWidth-215)/2, (@DesktopHeight-100)/2, -1)
GuiCreate("101.1 Music Player", 215, 100,(@DesktopWidth-215)/2, (@DesktopHeight-100)/2, BitOR($WS_POPUP,$WS_DLGFRAME),$WS_EX_TOPMOST); dev/null

GuiCtrlCreateLabel("Real Rock 101.1 Streaming Music Player", 10, 10, 200, 20)
;GUICtrlSetFont(-1, 8, 650)
GUICtrlSetColor(-1, 0xff0000)
$Volume = GuiCtrlCreateSlider(20, 30, 180, 20)
GuiCtrlCreateLabel("Volume", 85, 50, 40, 20)
GUICtrlSetColor(-1, 0xff)
GUICtrlSetData($Volume, 100)
$Play = GuiCtrlCreateButton("Play", 30, 70, 50, 25)
$Stop = GuiCtrlCreateButton("Stop", 130, 70, 50, 25)

GuiSetState()
$VolLevel = 100
HotKeySet("{F8}", "Hide")
HotKeySet("{F9}", "Show")
HotKeySet("{ESC}", "Quit")

While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $Play
        $oMediaPlayControl.Play
    Case $msg = $Stop
        $oMediaPlayControl.Stop
    Case Else
        If GUICtrlread($Volume) <> $VolLevel Then
            $oMediaPlaySettings.Volume = GUICtrlRead($Volume)
            $VolLevel = GUICtrlRead($Volume)
        EndIf
    EndSelect
WEnd
Exit
#endregion

#region functions
Func Quit()
    $oMediaPlayControl.Stop
    Exit
EndFunc

Func Hide()
    GUISetState(@SW_HIDE)
EndFunc

Func Show()
    GUISetState(@SW_SHOW)
EndFunc
#endregion

I press on ALT + F5 (for beta version)

I've got these errors:

C:\WINDOWS\Desktop\weer.au3(1,9) : ERROR: syntax error
include <
~~~~~~~~^
C:\WINDOWS\Desktop\weer.au3(21,104) : WARNING: $WS_POPUP: possibly used before declaration.
GuiCreate("101.1 Music Player", 215, 100,(@DesktopWidth-215)/2, (@DesktopHeight-100)/2, BitOR($WS_POPUP,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~^
C:\WINDOWS\Desktop\weer.au3(21,117) : WARNING: $WS_DLGFRAME: possibly used before declaration.
GuiCreate("101.1 Music Player", 215, 100,(@DesktopWidth-215)/2, (@DesktopHeight-100)/2, BitOR($WS_POPUP,$WS_DLGFRAME)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~^
C:\WINDOWS\Desktop\weer.au3(21,133) : WARNING: $WS_EX_TOPMOST: possibly used before declaration.
GuiCreate("101.1 Music Player", 215, 100,(@DesktopWidth-215)/2, (@DesktopHeight-100)/2, BitOR($WS_POPUP,$WS_DLGFRAME),$WS_EX_TOPMOST)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\WINDOWS\Desktop\weer.au3(42,33) : WARNING: $GUI_EVENT_CLOSE: possibly used before declaration.
    Case $msg = $GUI_EVENT_CLOSE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

;)

Share this post


Link to post
Share on other sites

include <GuiConstants.au3>

Must be

#include <GuiConstants.au3>

Dick

Share this post


Link to post
Share on other sites

Oh that...

No sorry that's a Copy/Past error. :$

Share this post


Link to post
Share on other sites

Oh that...

No sorry that's a Copy/Past error. :$

<{POST_SNAPBACK}>

How could it be a copy & paste error when the script shows it and the error output supplied shows the same. Looks like human error to me forgeting the # symbol.

Thanks Dickb. You done well.

Share this post


Link to post
Share on other sites

Perhaps YoseMite initially copied the line from the AutoIt forums -- I almost always miss the first character of any code when I do so.

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