mnaboud76 Posted September 15, 2017 Share Posted September 15, 2017 (edited) I want in my Program to connect to the polarion server and when I don't have Permetion close the program so how can i make it 1: WinWaitActive("","\\polarion-mainserver","120") If WinExists("","\\polarion-mainserver") Then MsgBox(0,"","the autentecation is ok") Example() Else MsgBox(0,"","you don't have the autentecation to the server") Exit EndIf or 2: Func ConnectTestFunc() TCPStartup() ; Start the TCP service. Local $sIPAddress = "\\polarion-mainserver" ; This IP Address Local $iPort = ; Port used for the connection. Local $iSocket = TCPConnect($sIPAddress, $iPort) If @error Then Local $iError = @error ;MsgBox(0,"","Could not connect, Error code: " & $iError) MsgBox(BitOR($MB_SYSTEMMODAL, $MB_ICONHAND), "", "Could not connect, Error code: " & $iError) Exit Else MsgBox(0, "", "Connection successful") EndIf TCPCloseSocket($iSocket) EndFunc Edited September 15, 2017 by Jos Please use the codebox as shown. :) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 15, 2017 Moderators Share Posted September 15, 2017 (edited) mnaboud76, You have started 2 threads - both in the "AutoIt Projects and Collaboration" section which is intended for multi-member collaboration when developing complex scripts. In future, please post your questions in the more appropriate "General Help & Support" section to where I have now moved them. Thanks in advance for your cooperation. M23 Edit: And now a third - stop it! Edited September 15, 2017 by Melba23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now