Загрузил(а) файлы в ''
This commit is contained in:
41
Web_Disk_Connectivity.au3
Normal file
41
Web_Disk_Connectivity.au3
Normal file
@@ -0,0 +1,41 @@
|
||||
#include <GUIConstantsEx.au3>
|
||||
#include <GuiComboBox.au3>
|
||||
#include <Constants.au3>
|
||||
#include <Process.au3>
|
||||
#NoTrayIcon
|
||||
|
||||
Opt("TrayIconHide", 1)
|
||||
Opt("ExpandEnvStrings", 1)
|
||||
|
||||
$Main = GUICreate('Web Disk Connectivity', 282, 79, 318, 213)
|
||||
$ButtON = GUICtrlCreateButton("Connect Drive", 8, 38, 121, 33)
|
||||
GUICtrlSetFont(-1, 8, 800, 0, "Tahoma")
|
||||
$ButtOFF = GUICtrlCreateButton("Disconnect Drive", 153, 38, 121, 33)
|
||||
GUICtrlSetFont(-1, 8, 800, 0, "Tahoma")
|
||||
$Combo = GUICtrlCreateCombo("", 8, 8, 266, 296, $GUI_SS_DEFAULT_COMBO)
|
||||
GUISetState(@SW_SHOW)
|
||||
|
||||
_GUICtrlComboBox_BeginUpdate($Combo)
|
||||
_GUICtrlComboBox_AddDir($Combo, @ScriptDir & "\Settings\*.ini")
|
||||
_GUICtrlComboBox_EndUpdate($Combo)
|
||||
|
||||
While 1
|
||||
$Ini = GUICtrlRead($Combo)
|
||||
$init = @ScriptDir & "\Settings\" & $ini
|
||||
$Server = IniRead($init, "Connect", "Server", "")
|
||||
$Login = IniRead($init, "Connect", "Login", "")
|
||||
$Pass = IniRead($init, "Connect", "Password", "")
|
||||
$Letter = IniRead($init, "Drive", "Letter", "")
|
||||
$Label = IniRead($init, "Drive", "Label", "")
|
||||
|
||||
Switch GUIGetMsg()
|
||||
Case $GUI_EVENT_CLOSE
|
||||
ExitLoop
|
||||
Case $ButtON
|
||||
DriveMapAdd($Letter & ":", $Server, 0, $Login, $Pass)
|
||||
$oShell = ObjCreate("shell.application")
|
||||
$oShell.NameSpace($Letter & ":").Self.Name = $Label
|
||||
Case $ButtOFF
|
||||
DriveMapDel($Letter & ":")
|
||||
EndSwitch
|
||||
WEnd
|
||||
Reference in New Issue
Block a user