Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/09/2015 in all areas

  1. guinness

    AutoIt3 Portable

    I drew inspiration from a similar Script/Program Creator made, for designing a Portable version of the SciTE4AutoIt3 bundled with the AutoIt3 package. Note: The problem with the previous Script/Program was it wasn't 100% Portable, it left files in the %APPDATA% folder, which was due to the session save feature of SciTe. So I modified the Script/Program and added parameters to check if SciTe was running and if the appropriate configuration files existed. Download: http://softwarespot.wordpress.com/code/autoit-portable/
    1 point
  2. try.. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GuiStatusBar.au3> #include <GuiIPAddress.au3> #include <StaticConstants.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> Global $IP Global $Port ; Connect to IP $MainForm = GUICreate("Server Starter", 158, 113, 192, 124); $cl_IP = _GUICtrlIpAddress_Create($MainForm, 16, 16, 130, 21); _GUICtrlIpAddress_Set($cl_IP, "127.0.0.1") $cl_Port = GUICtrlCreateInput("1018", 56, 44, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER)); $bStartServer = GUICtrlCreateButton("Connect", 40, 72, 75, 25); GUISetState(@SW_SHOW); MsgBox( 0, "Information", "IP Address: " & _GUICtrlIpAddress_Get($cl_IP)) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit; Case $bStartServer $IP = GUICtrlRead($cl_IP); $Port = CheckPort($cl_Port); GUIDelete($MainForm); ExitLoop; EndSwitch WEnd Func CheckPort($PortGui) if (GUICtrlRead($PortGui) >= 0 and GUICtrlRead($PortGui) <= 65535) then return GUICtrlRead($PortGui); Else msgbox(0, "Port is not correct", "Please, pick a different Port"); return -1; EndIf EndFunc8)
    1 point
  3. Try with the following code #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> GUICreate("slider", 220, 100, 100, 200) Local $idSlider1 = GUICtrlCreateSlider(10, 10, 200, 20) $hSlider=GUICtrlGetHandle($idSlider1) ; get handle of slider GUICtrlSetLimit(-1, 200, 0) ; change min/max value GUISetState(@SW_SHOW) GUICtrlSetData($idSlider1, 45) ; set cursor GUIRegisterMsg($WM_HSCROLL,"WM_HSCROLL") Func WM_HSCROLL($hWnd, $iMsg, $wParam, $lParam)     If $lParam=$hSlider Then         $iPos=_WinAPI_HiWord($wParam)         ConsoleWrite("pos:" & $iPos & @CRLF)     EndIf EndFunc L You can find more info at Trackbar Notification Messages.
    1 point
  4. arclite86, Try this. It reformats the url and works for all except ".ac.uk" which appears to be a typo. I couldn't work out the regexp for the replacement so I used the goofy looking case stmt for the reformat. #include <Array.au3> #include <File.au3> Global $aUrls, $PingTimeout = 1000 _FileReadToArray(@ScriptDir & "\urls.txt", $aUrls) For $i = 1 To UBound($aUrls) - 1 Switch StringLeft($aUrls[$i], 3) Case 'www' $aUrls[$i] = 'http://' & $aUrls[$i] Case 'htt' ContinueLoop Case Else $aUrls[$i] = 'http://www.' & $aUrls[$i] EndSwitch Next For $i = 1 To $aUrls[0] If _UrlExists($aUrls[$i]) Then ConsoleWrite("Exists: " & $aUrls[$i] & @LF) ContinueLoop EndIf ConsoleWrite("Not Exists Or No Response in " & $PingTimeout / 1000 & " Seconds: " & $aUrls[$i] & @LF) Next Func _UrlExists($url) If (StringLen(InetRead($url, 1)) > 0) Then Return 1 If Ping($url, $PingTimeout) Then Return 2 Return 0 EndFunc ;==>_UrlExists kylomas
    1 point
×
×
  • Create New...