Jump to content

TeamSpeak Shortcut Creator


ConsultingJoe
 Share

Recommended Posts

#include <GUIConstants.au3>
; == GUI generated with Koda ==
$Form1 = GUICreate("TeamSpeak Shortcut Creator", 249, 193, 192, 125)
GUICtrlCreateLabel("Server address:  (required)", 8, 8, 80, 33)
GUICtrlCreateLabel("Login:", 8, 40, 33, 17)
GUICtrlCreateLabel("Password:", 8, 64, 53, 17)
GUICtrlCreateLabel("Channel:", 8, 88, 46, 17)
GUICtrlCreateLabel("Nick Name:", 8, 112, 60, 17)
$Input1 = GUICtrlCreateInput("cyberzerocool.hopto.org:8767", 88, 8, 153, 21, -1, $WS_EX_CLIENTEDGE)
$Input2 = GUICtrlCreateInput("", 88, 40, 153, 21, -1, $WS_EX_CLIENTEDGE)
$Input3 = GUICtrlCreateInput("", 88, 64, 153, 21, $ES_PASSWORD, $WS_EX_CLIENTEDGE)
$Input4 = GUICtrlCreateInput("", 88, 88, 153, 21, -1, $WS_EX_CLIENTEDGE)
$Input5 = GUICtrlCreateInput("", 88, 112, 153, 21, -1, $WS_EX_CLIENTEDGE)
GUICtrlCreateLabel("URL:", 8, 172, 29, 17)
$Button1 = GUICtrlCreateButton("Save Shortcut", 8, 136, 81, 25)
$Button2 = GUICtrlCreateButton("Generate URL", 96, 136, 81, 25)
$Input6 = GUICtrlCreateInput("Teamspeak://", 40, 168, 201, 21, -1, $WS_EX_CLIENTEDGE)
$Button3 = GUICtrlCreateButton("Copy URL", 184, 136, 57, 25)
GUISetState(@SW_SHOW)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $Button2
        GUICtrlSetData($Input6, GenerateURL())
    Case $msg = $Button3
        ClipPut(GUICtrlRead( $Input6 ))
    Case $msg = $Button1
        GUICtrlSetData($Input6, GenerateURL())
        $file = FileSaveDialog( "TeamSpeak Shortcut Creator", @ScriptDir, "Internet Shortcut Files (*.url)", 18, "TeamSpeak Login.url" )
        If @error Then ContinueLoop
        FileWrite( $file, "[InternetShortcut]" & @CRLF & "URL=" & GUICtrlRead( $Input6 ))
    EndSelect
WEnd
Exit

Func GenerateURL()
    $server = GUICtrlRead( $Input1 )
    $login = GUICtrlRead( $Input2 )
    $password = GUICtrlRead( $Input3 )
    $channel = GUICtrlRead( $Input4 )
    $nickname = GUICtrlRead( $Input5 )
    Return "Teamspeak://" & $server & "/?nickname=" & $nickname & "?loginname=" & $login & "?password=" & $password & "?channel=" & $channel & "?"
EndFunc

Check out ConsultingJoe.com
Link to comment
Share on other sites

  • 6 months later...
  • 4 months later...

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
 Share

  • Recently Browsing   0 members

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