Advertisement
Guest User

Untitled

a guest
May 26th, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 1.83 KB | None | 0 0
  1. While 1
  2.   $nMsg = GUIGetMsg ()
  3.     Switch $nMsg
  4.                 Case $GUI_EVENT_CLOSE
  5.                     ExitLoop
  6.                 Case $start
  7.                     start()
  8.                 Case $credits
  9.                     MsgBox(0,'Credits.','Made by Zero0679 @ TBN.')
  10.                 Case $exit
  11.                     Exit
  12.                 Case $load
  13.                     $File1 = FileOpenDialog("Choose File...", @DesktopDir, "Text Documents (*.txt)")
  14.                     $Var = FileRead($File1)
  15.                     GUICtrlSetData($Links,$Var)
  16.                 Case $clear
  17.                     GUICtrlSetData($Links,'')
  18.                 Case $save
  19.                     $SaveDir = FileSaveDialog("Save Link(s)",@DesktopDir,"Text Files (*.txt)|All Files (*.*)",18,"Link List.txt")
  20.                     FileWrite($SaveDir,GUICtrlRead($Links))
  21.                 Case $login
  22.                     GUICtrlSetData($login,'Login Details : Set')
  23.                     $Form2 = GUICreate("Login Details.", 200, 83, -1, -1, Default, BitOR($WS_EX_MDICHILD, $WS_EX_TOOLWINDOW), $Form1)
  24.                     $ls2 = FileReadLine($file,-1)
  25.                     $rats2 = StringSplit($ls2,'/')
  26.                     If $ls2 = '' Then
  27.                         $user = GUICtrlCreateInput('Username', 5, 5, 150, 21)
  28.                         $pass = GUICtrlCreateInput('Password', 5, 30, 150, 21)
  29.                     Else
  30.                         $uun = $rats2[1]
  31.                         $bbn = $rats2[2]
  32.                         $user = GUICtrlCreateInput($uun, 5, 5, 150, 21)
  33.                         $pass = GUICtrlCreateInput($bbn, 5, 30, 150, 21)
  34.                     EndIf
  35.                     $savedata = GUICtrlCreateButton('Save Data', 25, 55, 140, 25)
  36.                     GUISetState(@SW_SHOW)
  37.  
  38.                         While 1
  39.  
  40.                             $aaMsg = GUIGetMsg(1)
  41.  
  42.                             If $aaMsg[1] = $Form2 Then ; Check we are getting messages from the child
  43.                                 Switch $aaMsg[0]
  44.                                     Case $GUI_EVENT_CLOSE
  45.                                         GUIDelete($Form2)
  46.                                         ExitLoop
  47.                                     Case $savedata
  48.                                         ; Save data code goes here
  49.                                         FileWriteLine($file,GUICtrlRead($user) & '/' & GUICtrlRead($pass))
  50.                                         GUICtrlSetData($user,'')
  51.                                         GUICtrlSetData($pass,'')
  52.                                         GUIDelete($Form2)
  53.                                         ExitLoop
  54.                                 EndSwitch
  55.                             EndIf
  56.                         WEnd
  57.  
  58.     EndSwitch
  59.  
  60. WEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement