Jump to content

Recommended Posts

Posted

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?

Posted

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

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
Posted

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 *

Posted

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


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

Posted

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...

  • Developers
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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted

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 *

  • Developers
Posted

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted

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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

;)

Posted

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.

Posted

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...