Developers Jos Posted April 6, 2019 Developers Share Posted April 6, 2019 13 minutes ago, Colduction said: doesn't work even with using Return =( No idea what that means........., but you really need to learn how to debug your code instead of posting these type of posts. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Developers Jos Posted April 6, 2019 Developers Share Posted April 6, 2019 Try this version stripped version to see if that does what you want: expandcollapse popup;============================================================================= ;Created by Black Scorpion ;Powered by XPulse Team (Iranian Team) ;Contact us with E-Mail: amirhosein.hps@gmail.com ;Contact us with Telegram Bot: @BlackScorpionRobot ;============================================================================== #NoTrayIcon #include <ButtonConstants.au3> #include <Crypt.au3> #include <EditConstants.au3> #include <FileConstants.au3> #include <GUIConstantsEx.au3> #include <MemoryConstants.au3> #include <MsgBoxConstants.au3> #include <StaticConstants.au3> #include <WinAPIFiles.au3> #include <WindowsConstants.au3> ;================================== Variables =================================== ; ================================== Variables =================================== ; Hot-Keys on keyboard HotKeySet("!+m", "LoginForm") ; (Alt + Shift + M) as a Hot-Key to access to self-menu HotKeySet("!+q", "SelfTerminate") ; (Alt + Shift + Q) as a Hot-Key to self-terminate HotKeySet("!+x", "KillBMProcesses") ; (Alt + Shift + X) as a Hot-Key to kill all Word processes MainActivity() Func MainActivity() While 1 Sleep(2000) WEnd EndFunc ;==>MainActivity Func LoginForm() ; Authentication form for accessing main form Global $LoginForm = GUICreate("Login", 201, 161, -1, -1, BitXOR($GUI_SS_DEFAULT_GUI, $WS_MINIMIZEBOX)) Global $CloseBTN = GUICtrlCreateButton("Close", 7, 126, 62, 25) Global $SignInBTN = GUICtrlCreateButton("Sign-in", 71, 126, 90, 25) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") Global $PasswordInput = GUICtrlCreateInput("admin", 8, 88, 185, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_PASSWORD)) Global $UsernameInput = GUICtrlCreateInput("admin", 8, 40, 185, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER)) Global $UsernameLBL = GUICtrlCreateLabel("Username:", 8, 21, 55, 17) Global $PasswordLBL = GUICtrlCreateLabel("Password:", 8, 68, 53, 17) Global $ResetCredIcon = GUICtrlCreateButton("res", 160, 126, 32, 25) GUICtrlSetTip(-1, "Reset Credentials via PSIC") GUICtrlSetCursor(-1, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE, $CloseBTN GUIDelete($LoginForm) Return Case $SignInBTN If AuthProcess(GUICtrlRead($UsernameInput), GUICtrlRead($PasswordInput)) = 1 Then MsgBox(64, "", "Welcome!") GUIDelete($LoginForm) Return EndIf Case $ResetCredIcon GUIDelete($LoginForm) PSICGenerator() Return EndSwitch If GUICtrlRead( $UsernameInput) = "" Or GUICtrlRead($PasswordInput) = "" And BitAND(GUICtrlGetState($SignInBTN), $GUI_ENABLE) Then GUICtrlSetState($SignInBTN, $GUI_DISABLE) EndIf If GUICtrlRead($UsernameInput) <> "" And GUICtrlRead($PasswordInput) <> "" And BitAND(GUICtrlGetState($SignInBTN), $GUI_DISABLE) Then GUICtrlSetState($SignInBTN, $GUI_ENABLE) EndIf WEnd EndFunc ;==>LoginForm Func AuthProcess($UsernameInput, $PasswordInput) Return 1 EndFunc ;==>AuthProcess Func PSICGenerator() Global $PSICGeneratorForm = GUICreate("PSIC Generator.ver1.0", 563, 92, 242, 179, -1, -1) Global $PSICIBox = GUICtrlCreateInput("PSIC", 48, 9, 473, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_READONLY)) Global $EncryptedPSICIBox = GUICtrlCreateInput("Encrypted PSIC", 48, 37, 473, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER)) Global $CopyBTN = GUICtrlCreateButton("C", 528, 7, 27, 25) GUICtrlSetFont(-1, 8, 800, 4, "MS Sans Serif") GUICtrlSetTip(-1, "Copy PSIC") Global $PasteBTN = GUICtrlCreateButton("P", 528, 35, 27, 25) GUICtrlSetFont(-1, 8, 800, 4, "MS Sans Serif") GUICtrlSetTip(-1, "Paste Encrypted PSIC") Global $Label1 = GUICtrlCreateLabel("PSIC:", 16, 11, 31, 17, BitOR($SS_CENTER, $SS_CENTERIMAGE)) Global $Label2 = GUICtrlCreateLabel("E-PSIC:", 6, 38, 41, 17, BitOR($SS_CENTER, $SS_CENTERIMAGE)) Global $ClearBTN = GUICtrlCreateButton("Clear", 204, 62, 59, 25) Global $ForceLoginBTN = GUICtrlCreateButton("Force Login", 267, 62, 91, 25) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE GUIDelete($PSICGeneratorForm) Return Case $CopyBTN $ReadPSIC = GUICtrlRead($PSICIBox) Case $PasteBTN Local $PasteFromCB = ClipGet() GUICtrlSetData($EncryptedPSICIBox, $PasteFromCB) EndSwitch WEnd EndFunc ;==>PSICGenerator Func KillBMProcesses() ; Sleep for decrease CPU Usage Return EndFunc ;==>KillBMProcesses Func SelfTerminate() ; Self terminate own process MsgBox(64, "Successfully", "Operation has been successfully terminated!", 5) Exit EndFunc ;==>SelfTerminate Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
RestrictedUser Posted April 6, 2019 Author Share Posted April 6, 2019 5 hours ago, Jos said: debug your code instead of posting these type of posts I am not a professional coder, I've just coded 2 or 1 month with AutoIt I have many ways to be at least a good coder and then post HQ questions Link to comment Share on other sites More sharing options...
RestrictedUser Posted April 6, 2019 Author Share Posted April 6, 2019 4 hours ago, Jos said: Try this version Ok, i will test 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