Jump to content

soebis

Members
  • Posts

    11
  • Joined

  • Last visited

About soebis

  • Birthday 09/15/1987

Profile Information

  • Location
    Indonesia
  • WWW
    http://TrikGratis.com

soebis's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. work xp but dont's work in 7
  2. thanks but I do not understand the command.. Can you give an example using myscript
  3. hi I have a little problem at the stop function how to stop a running process if the click stop Simple Command And Route.au3
  4. I have tried, but still can not work
  5. hi sorry I'm not good english I have a problem delete all items in the combobox This script I #NoTrayIcon #RequireAdmin #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <String.au3> #include <Array.au3> #include <GUIComboBox.au3> #include <File.au3> #include <GUIEdit.au3> #Region ### START Koda GUI section ### Form=e:\kumpulan script\koda_1.7.3.0\forms\dialup.kxf $Form2 = GUICreate("Percobaan", 488, 211, 181, 137) $Group1 = GUICtrlCreateGroup("Dial Up", 16, 16, 289, 113) $cmb_dial = GUICtrlCreateCombo("", 32, 52, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) $Label1 = GUICtrlCreateLabel("Dial Up Name", 32, 35, 70, 17) $update = GUICtrlCreateButton("Update", 216, 50, 73, 25, $WS_BORDER) $input_ipc = GUICtrlCreateInput("", 32, 96, 145, 21) $Label2 = GUICtrlCreateLabel("Hunter IPC", 32, 80, 56, 17) $btn_connect= GUICtrlCreateButton("Connect", 184, 94, 105, 25, $WS_BORDER) $clear = GUICtrlCreateButton("C", 184, 50, 25, 25, $WS_BORDER) GUICtrlSetTip(-1, "Clear All Dial Up Profil") GUICtrlCreateGroup("", -99, -99, 1, 1) $lsbox_ipc = GUICtrlCreateList("", 314, 22, 153, 162) $Group2 = GUICtrlCreateGroup("IPC Kamu Sekarang", 16, 136, 289, 49) $lbl_status = GUICtrlCreateEdit("", 48, 155, 217, 20, BitOR($ES_CENTER,$ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_READONLY,$ES_WANTRETURN)) GUICtrlSetData(-1, "") GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) _LoadSetting() #EndRegion ### END Koda GUI section ### #region func _update() Run("rasphone.exe") WinWait("Network Connections") $hnd = ControlGetHandle("Network Connections", "", "ComboBox1") $lis_arr = _guictrlcombobox_getlistarray($hnd) For $i = 1 To $lis_arr[0] Step 1 _GUICtrlComboBox_AddString($cmb_dial,$lis_arr[$i]) Next WinClose("Network Connection") EndFunc #endregion #region Func clear() _GUICtrlComboBox_deleteallitems($cmb_dial, 1) EndFunc #Endregion #region $setting = @ScriptDir&"\my_setting.ini" $configuration = "Configuration" $last_dialname = "Last DialName" $last_dial = "Last Dial" $last_ipc = "Last IPC" If Not FileExists($setting) Then _FileCreate($setting) FileSetAttrib($setting, "H") IniWriteSection($setting,$configuration,"") IniWrite($setting,$configuration,$last_dialname,"") IniWrite($setting,$configuration,$last_dial,"") IniWrite($setting,$configuration,$last_ipc,"") EndIf Func _SaveSetting() IniWrite($setting, $configuration, $last_dialname, _guictrlcombobox_getlist($cmb_dial)) IniWrite($setting, $configuration, $last_dial, Guictrlread($cmb_dial)) IniWrite($setting, $configuration, $last_ipc,GUICtrlRead($input_ipc)) EndFunc Func _LoadSetting() $d_arr = StringSplit(IniRead("my_setting.ini", "configuration", "Last DialName", ""), "|") For $i = 1 To $d_arr[0] Step 1 _guictrlcombobox_addstring($cmb_dial, $d_arr[$i]) Next _guictrlcombobox_selectstring($cmb_dial, IniRead("my_setting.ini", "Configuration", "Last Dial", "")) GUICtrlSetData($input_ipc, IniRead("my_setting.ini", "Configuration", "Last IPC", "")) EndFunc #endregion #region Global $status = "",$disconnected = "Disconnected",$connected = "Connected" If @IPAddress1 <> "127.0.0.1" Then $status = $connected GUICtrlSetData($btn_connect,"Disconnect") Else $status = $disconnected EndIf Func _UpdateStatus($status_text) GUICtrlSetData($lbl_status,"") _GUICtrlEdit_AppendText(@CRLF & $lbl_status,$status_text) EndFunc #endregion #Region Func real_search() While ip_search() = 0 _disconnect() _connect() _guictrllistbox_addstring($input_ipc, @IPAddress1) GUICtrlSetData($lsbox_ipc,@IPAddress1) WEnd If ip_search() = 1 Then _disconnect() _connect() _guictrllistbox_addstring($input_ipc, @IPAddress1) GUICtrlSetData($lsbox_ipc,@IPAddress1) EndIf EndFunc #Endregion #region Func ip_search() $ip_string = GUictrlread($input_ipc) Switch $ip_string Case "" Return 1 Case Else $ip_stringsplit = StringSplit(Guictrlread($input_ipc), " ") For $i = 1 To $ip_stringsplit[0] Step 1 If StringInStr(@IPAddress1, $ip_stringsplit[$i]) = 1 Then Return 2 ExitLoop Else ContinueLoop EndIf Next Return 0 EndSwitch EndFunc #endregion #region func _connect() $dial_name = GUICtrlRead($cmb_dial) _UpdateStatus("Connecting to "& $dial_name) $connect_process = Run("rasdial "&$dial_name,"",@SW_HIDE) Sleep(100) ProcessWaitClose($connect_process) _UpdateStatus("Connected to " & $dial_name) GUICtrlSetData($lsbox_ipc,@IPAddress1) Sleep(100) _UpdateStatus("Connected IP " & @IPAddress1) $status = $connected GUICtrlSetData($btn_connect,"Disconnect") EndFunc #endregion #Region Func _Disconnect() _UpdateStatus("Disconnecting...") $dial_name = GUICtrlRead($cmb_dial) $disconnect_process = Run("rasdial "&$dial_name&" /disconnect","",@SW_HIDE) Sleep(100) ProcessWaitClose($disconnect_process) _UpdateStatus("Disconnected from " & $dial_name) Sleep(100) $status = $disconnected GUICtrlSetData($btn_connect,"Connect") EndFunc #endregion #Region While 1 Sleep(10) $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE _SaveSetting() Exit Case $btn_connect Switch $status Case $disconnected real_search() Case $connected _Disconnect() case $clear clear() EndSwitch case $update _update() EndSwitch WEnd #endregion how if at the click of a button clear all deleted items in the combobox please help me
  6. no, I'm just the script examples related to it. I know this is hard. but perhaps my friends can help
  7. hi could help me make this See this picture means how to bring up the vpn log it in my GUI look the same as when the click connect openvpnGUI please help me,I've given up sorry my bade nglish
  8. Thanks, could eventually also
  9. I do not understand how to bring it #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <GuiIPAddress.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=form31.kxf $Form1_1 = GUICreate("Form1", 239, 156, 192, 124) $IPAddress1 = _GUICtrlIpAddress_Create($Form1_1, 40, 32, 153, 25) _GUICtrlIpAddress_Set($IPAddress1, "0.0.0.0") $Button1 = GUICtrlCreateButton("Show IP", 56, 88, 105, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
  10. hi, I am from Indonesia I recently learned Autoit ok with it, how the contents of the script where it led us in Gui ip address it? These examples of his drawings sorry about my english: D thanks
×
×
  • Create New...