Jump to content

tomson

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by tomson

  1. Put the int first line: # -*- coding: utf-8 -*-
  2. Argumentum........ YOU ARE THE MAN!!!!!!!!!!!! Works!!!!!!!!!! Thanks a lot........ But I have to ask: why this version (v3.5.4) works and the v3.6.2 no???? AutoIt Webmaster must have to create a page with Previous Versions of SciTE too!!!!!!!!!! Thanks again, Argumentum....... Could you create a installer with v3.5.4????? one comment: I think that this version (v3.5.4) its a little slow, but works
  3. In my work I cant install the new version - only AutoIt v3.3.8.1 & SciTE v2.28 its allowed.... So at home I can continue my job (same project) if I have AutoIt v3.3.8.1 & SciTE v2.28 too... The AutoIt v3.3.8.1 I can get in https://www.autoitscript.com/autoit3/files/archive/autoit/, but does anyone can send me a link to the SciTE v2.28???
  4. Hi..... With this version of SciTE I'm getting some errors - I'm using AutoIt v3.3.4.0. (see images).... (Build, F7, I get error too) If I use SciTE v1.79, I dont have problems.....
  5. Hi..... I'm using AutoIt v3.3.4.0 and the new (full) SciTE v3.6.2 has some problems for me: CTRL + F7 (compile) - I get error..... Installing (at the end) I get error.......... I tested with SciTE v1.79 and no problems........ Was easy get the AutoIt v3.3.4.0, but no success to old versions of SciTE....
  6. Hello Again..... Just now I saw your other problem with function CreateUser..... You must use GUICtrlRead($x) to receive the data typed in Username Input and Password Input You code need more attention!!! Try now (fixed just the _CREATEAUSER() Function) #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <array.au3> #Region ### START Koda GUI section ### Form= Global $USERNAME,$PASSWORD, $GROUPNAME,$AUTOLOGON, $KEY, $Form2 ; =====>>>>> MUST DECLARE ; Opt("guioneventmode", 1) $Form1 = GUICreate("User Creator - by Bode", 328, 210, 192, 124) GUISetCursor (3) $nFileMenu = GUICtrlCreateMenu("File") $nHelpitem2 = GUICtrlCreateMenuItem("Help", $nFileMenu) GUICtrlSetOnEvent(-2, "help") $nAboutitem = GUICtrlCreateMenuItem("About", $nFileMenu) GUICtrlSetOnEvent(-3, "about") $Group1 = GUICtrlCreateGroup("", 8, 80, 313, 105) $Button1 = GUICtrlCreateButton("Make a Account", 32, 96, 107, 41, $WS_GROUP) $Button2 = GUICtrlCreateButton("Show Accounts", 192, 96, 107, 41, $WS_GROUP) $Label1 = GUICtrlCreateLabel("Ver:", 16, 160, 30, 17) GUICtrlSetFont(-1, 8, 800, 0, "Verdana") $Label2 = GUICtrlCreateLabel("0.2", 48, 160, 24, 17) GUICtrlSetFont(-1, 8, 800, 0, "Verdana") $Label3 = GUICtrlCreateLabel("Made by Bode", 248, 168, 68, 14) GUICtrlSetFont(-1, 6, 800, 0, "Verdana") GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlSetCursor (-1, 3) GUISetOnEvent($GUI_EVENT_CLOSE, "onautoitexit") $listText = GUICtrlCreateList(" - Creator User Windows - Bode This software is free Thank you for using it by Bode @Caram ", 0, 1, 328, 40, 10) ; a label (change it to your name GUICtrlSetFont(-1, 17, 400, 2, "Impact"); GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 Sleep(50) $s_TempText = GUICtrlRead($listText) GUICtrlSetData($listText, "|" & StringTrimLeft($s_TempText, 1) & StringLeft($s_TempText, 1)) $nMsg = GUIGetMsg() Switch $nMsg Case $nMsg = $GUI_EVENT_CLOSE Case $nMsg = $Button1 ; problem is here SEGUNDA_GUI() ; i know! , this dont will work (But I tried everything ) Exit EndSwitch WEnd ;Make a Account Func SEGUNDA_GUI() $Form2 = GUICreate("Make A Account - by Bode", 255, 137, 192, 124) $Group2 = GUICtrlCreateGroup("", 8, 8, 233, 121) $UsernameINPUT = GUICtrlCreateInput("", 104, 24, 129, 21) $PassINPUT = GUICtrlCreateInput("", 104, 64, 129, 21) $UsernameTXT = GUICtrlCreateLabel("Username:", 16, 24, 83, 20) GUICtrlSetFont(-1, 10, 800, 0, "Verdana") $PassTXT = GUICtrlCreateLabel("Password:", 16, 64, 79, 20) GUICtrlSetFont(-1, 10, 800, 0, "Verdana") $BotaoCONFIRMAR = GUICtrlCreateButton("Confirm", 152, 96, 81, 25) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) While 1 $nMsg2 = GUIGetMsg() Switch $nMsg2 Case $GUI_EVENT_CLOSE Exit Case $BotaoCONFIRMAR ; dont work --- problem is here (NO MORE!!!!!!!!) $USERNAME = GUICtrlRead($UsernameINPUT) $PASSWORD = GUICtrlRead($PassINPUT) _CREATEAUSER() EndSwitch WEnd EndFunc ;;;; script for t account user for windowns (I had done before him with "inputbox") Func _CREATEAUSER() If Not FileExists(EnvGet("AllUsersProfile") & "\..\" & $USERNAME) Then RunWait(@ComSpec & " /c " & "Net User " & $USERNAME & " " & $PASSWORD & " /add &&" & "Net LocalGroup " & $GROUPNAME & " " & $USERNAME & " /add &" & "Net Accounts /MaxPwAge:UnLimited", "") If $AUTOLOGON Then $KEY = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" RegWrite($KEY, "DefaultUserName", "Reg_sz", $USERNAME) RegWrite($KEY, "DefaultPassword", "Reg_sz", $PASSWORD) RegWrite($KEY, "AutoAdminLogon", "Reg_sz", 1) EndIf EndIf GUIDelete($Form2) ; =====>>>>> TO CLOSE THE 2º GUI MsgBox(0,"Attention","User Created!","") ; =====>>>>> OPTIONAL EndFunc func help() MsgBox(32,"Modo de uso ","Text ") EndFunc Func about() SplashTextOn("título", " Software Made by Bode (community AutoitBrasil) Thanks you for Test", -1, -1, -1, -1, 1, "Arial Black", 24) Sleep(5000) ; Just to let more beautiful SplashOff() EndFunc Func onautoitexit() Exit EndFunc
  7. Try to put the 2º GUI in a function..... I "disabled" the command (Opt("guioneventmode", 1)) - dont ask me why - and works here.... (in portuguese: Nao me pergunte porque, mas desabilitei o tal Opt("guioneventmode", 1) e criei uma funcao para a segunda GUI (interface grafica). Aqui funcionou..... teste ai e veja..... Nao faço a minima ideia para que serve o bagulho do Opt("guioneventmode", 1) e por mim deixa ele quieto.) Make: #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <array.au3> #Region ### START Koda GUI section ### Form= ; Opt("guioneventmode", 1) ; ########################## DISABLED !!!!!!! $Form1 = GUICreate("User Creator - by Bode", 328, 210, 192, 124) GUISetCursor (3) $nFileMenu = GUICtrlCreateMenu("File") $nHelpitem2 = GUICtrlCreateMenuItem("Help", $nFileMenu) GUICtrlSetOnEvent(-2, "help") $nAboutitem = GUICtrlCreateMenuItem("About", $nFileMenu) GUICtrlSetOnEvent(-3, "about") $Group1 = GUICtrlCreateGroup("", 8, 80, 313, 105) $Button1 = GUICtrlCreateButton("Make a Account", 32, 96, 107, 41, $WS_GROUP) $Button2 = GUICtrlCreateButton("Show Accounts", 192, 96, 107, 41, $WS_GROUP) $Label1 = GUICtrlCreateLabel("Ver:", 16, 160, 30, 17) GUICtrlSetFont(-1, 8, 800, 0, "Verdana") $Label2 = GUICtrlCreateLabel("0.2", 48, 160, 24, 17) GUICtrlSetFont(-1, 8, 800, 0, "Verdana") $Label3 = GUICtrlCreateLabel("Made by Bode", 248, 168, 68, 14) GUICtrlSetFont(-1, 6, 800, 0, "Verdana") GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlSetCursor (-1, 3) GUISetOnEvent($GUI_EVENT_CLOSE, "onautoitexit") $listText = GUICtrlCreateList(" - Creator User Windows - Bode This software is free Thank you for using it by Bode @Caram ", 0, 1, 328, 40, 10) ; a label (change it to your name GUICtrlSetFont(-1, 17, 400, 2, "Impact"); GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 Sleep(50) $s_TempText = GUICtrlRead($listText) GUICtrlSetData($listText, "|" & StringTrimLeft($s_TempText, 1) & StringLeft($s_TempText, 1)) $nMsg = GUIGetMsg() Switch $nMsg Case $nMsg = $GUI_EVENT_CLOSE Case $nMsg = $Button1 ; problem is here SEGUNDA_GUI() ; ##########>>>>>>>>> CALLING THE FUNCTION Exit EndSwitch WEnd ;Make a Account Func SEGUNDA_GUI() ; ##########>>>>>>>>> CREATING THE FUNCTION Local $USERNAME,$PASSWORD, $Button3 $Form2 = GUICreate("Make A Account - by Bode", 254, 136, 192, 124) $Group2 = GUICtrlCreateGroup("", 8, 8, 233, 121) GUICtrlCreateInput("", 104, 24, 129, 21) GUICtrlCreateInput("", 104, 64, 129, 21) $Username = GUICtrlCreateLabel("Username:", 16, 24, 83, 20) GUICtrlSetFont(-1, 10, 800, 0, "Verdana") $Label4 = GUICtrlCreateLabel("Password:", 16, 64, 79, 20) GUICtrlSetFont(-1, 10, 800, 0, "Verdana") $Button3 = GUICtrlCreateButton("Confirm", 152, 96, 75, 25, BitOR($BS_BITMAP,$WS_GROUP)) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) While 1 $nMsg2 = GUIGetMsg() Switch $nMsg2 Case $GUI_EVENT_CLOSE Exit Case $nMsg2 = $Button3 ; dont work --- problem is here _CREATEAUSER($USERNAME,$PASSWORD) EndSwitch WEnd EndFunc ;;;; script for creat account user for windowns (I had done before him with "inputbox") Func _CREATEAUSER($NAME, $PASSWORD = "", $GROUPNAME = "Administrators", $AUTOLOGON = 0) Local $KEY If Not FileExists(EnvGet("AllUsersProfile") & "\..\" & $NAME) Then RunWait(@ComSpec & " /c " & "Net User " & $NAME & " " & $PASSWORD & " /add &&" & "Net LocalGroup " & $GROUPNAME & " " & $NAME & " /add &" & "Net Accounts /MaxPwAge:UnLimited", "", @SW_HIDE) If $AUTOLOGON Then $KEY = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" RegWrite($KEY, "DefaultUserName", "Reg_sz", $NAME) RegWrite($KEY, "DefaultPassword", "Reg_sz", $PASSWORD) RegWrite($KEY, "AutoAdminLogon", "Reg_sz", 1) EndIf EndIf EndFunc func help() MsgBox(32,"Modo de uso ","Text ") EndFunc Func about() SplashTextOn("título", " Software Made by Bode (community AutoitBrasil) Thanks you for Test", -1, -1, -1, -1, 1, "Arial Black", 24) Sleep(5000) ; Just to let more beautiful SplashOff() EndFunc Func onautoitexit() Exit EndFunc
  8. THANKS A LOT FOR ALL!!!!!!!!! I'm using an adapted code from smashly..... Here it's: $MainGRP = GUICtrlCreateGroup("", 16, 8, 481, 257) $LinhaINPUT = GUICtrlCreateInput("3", 107, 30, 25, 21, BitOR($ES_CENTER, $ES_NUMBER)) $OrdemCOMBO = GUICtrlCreateCombo("", 235, 62, 33, 25, $CBS_DROPDOWNLIST) CARACTER_COMBO($OrdemCOMBO, "B") $HistoricoCOMBO = GUICtrlCreateCombo("", 172, 95, 33, 25, $CBS_DROPDOWNLIST) CARACTER_COMBO($HistoricoCOMBO, "H") $StatusOrdemCOMBO = GUICtrlCreateCombo("", 219, 127, 33, 25, $CBS_DROPDOWNLIST) CARACTER_COMBO($StatusOrdemCOMBO, "F") $StatusDetalhadoCOMBO = GUICtrlCreateCombo("", 220, 159, 33, 25, $CBS_DROPDOWNLIST) CARACTER_COMBO($StatusDetalhadoCOMBO, "G") $PastaTrabalhoINPUT = GUICtrlCreateInput("INSTRUMENTACAO", 203, 190, 206, 21) $CaminhoPlanilhaINPUT = GUICtrlCreateInput($Local_Planilha, 24, 224, 385, 21) Func CARACTER_COMBO($Control_ID, $ValorDefault) ; $Control_ID = Control ID do Combo Box que desejamos alterar o conteudo ; $ValorDefault = Valor padrao que terá o Combo Box ; $Marcacao_Do_Flag: 0 = A To Z, 1= 0 To 9 - nao utilizado, pois só usaremos letras Local $ASCII_Inicial = 65 ; Definido a Variavel $ASCII_Inicial como Local (apenas para esta funcao) e com valor do Caracter 65 da tabela ASCII que representa o "A" Local $ASCII_Final = 90 ; Definido a Variavel $ASCII_Inicial como Local (apenas para esta funcao) e com valor do Caracter 90 da tabela ASCII que representa o "Z" For $i = $ASCII_Inicial To $ASCII_Final GUICtrlSetData($Control_ID, Chr($i), $ValorDefault) Next EndFuncThanks for ALL again.
  9. I'm from Brasil and I don't speak English very well - sorry. I made some GUI Input and would like 4 of these GUI Input accept only letters - not numbers (uppercase letters = A,B,C,D,..,Z) - Something like $ES_LETTERS instead of $ES_NUMBER. What I have to do? Tried Search and Google a lot and nothing.... Thanks for all. $LinhaINPUT = GUICtrlCreateInput("3", 107, 30, 25, 21, BitOR($ES_CENTER,$ES_NUMBER)) ; THIS ACCEPT ONLY 1 NUMBER $OrdemINPUT = GUICtrlCreateInput("B", 235, 62, 25, 21, BitOR($ES_CENTER,$ES_UPPERCASE)) ; THIS MUST ACCEPT ONLY 1 LETTER (A,B,C,...,Z) GUICtrlSetLimit(-1, 1) $HistoricoINPUT = GUICtrlCreateInput("H", 171, 94, 25, 21, BitOR($ES_CENTER,$ES_UPPERCASE)) ; THIS MUST ACCEPT ONLY 1 LETTER (A,B,C,...,Z) GUICtrlSetLimit(-1, 1) $StatusOrdemINPUT = GUICtrlCreateInput("F", 219, 126, 25, 21, BitOR($ES_CENTER,$ES_UPPERCASE)) ; THIS MUST ACCEPT ONLY 1 LETTER (A,B,C,...,Z) GUICtrlSetLimit(-1, 1) $StatusDetalhadoINPUT = GUICtrlCreateInput("G", 219, 158, 25, 21, BitOR($ES_CENTER,$ES_UPPERCASE)) ; THIS MUST ACCEPT ONLY 1 LETTER (A,B,C,...,Z) GUICtrlSetLimit(-1, 1) $PastaTrabalhoINPUT = GUICtrlCreateInput("INSTRUMENTACAO", 203, 190, 206, 21) $CaminhoPlanilhaINPUT = GUICtrlCreateInput("", 24, 224, 385, 21)
×
×
  • Create New...