Jump to content

Akarillon

Active Members
  • Posts

    95
  • Joined

  • Last visited

Everything posted by Akarillon

  1. Is there a problem with this script on a newer version of AutoIT? I only get error messages while trying to compile it. >"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /ShowGui /in "\\domain\folder$\username\Documents\AutoIT\Prosjekter\Lock'n\Lock'n.au3" +>13:05:06 Starting AutoIt3Wrapper v.2.2.0.0 SciTE v.3.4.1.0 Keyboard:00000414 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64 Environment(Language:0414) +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper ! Obfuscator support has been discontinued and is replaced by Au3Stripper using "#Au3Stripper_" directives. ! The directive to run Au3Stripper is: #AutoIt3Wrapper_Run_Au3Stripper=y ; Default is n ! #Au3Stripper_Parameters options are: ! /so or /striponly : This is the default when no parameters are provided. same as /sf=1 /sv=1 ! /sf or /StripFunctions : 1=Strip all unused Func's (1=default) ! /sv or /StripVariables : 1=Strip all unused Global var records (1=default) ! /mo or /mergeonly : Just merges the Include files into the source and strips the Comments, just like aut2exe would do. ! /soi or /striponlyincludes: same as /striponly but will leave master script untouched. ! /mi or /MaxIterations : Sets the maximum Iterations Au3Stripper will perform. Default is 5. ! /Beta : Use Beta Includes. Dont use AutoIt3Wrapper_Run_Au3Stripper. -> No changes made.. >Running AU3Check (3.3.10.2) from:C:\Program Files (x86)\AutoIt3 input:\\domain\folder$\username\Documents\AutoIT\Prosjekter\Lock'n\Lock'n.au3 +>13:05:10 AU3Check ended.rc:0 >Running Au3Stripper (1.2.0.0) from:C:\Program Files (x86)\AutoIt3\SciTE\Au3Stripper cmdline: - ### C:\Program Files (x86)\AutoIt3\SciTE\Au3Stripper\Au3Stripper.dat missing... Please get it from the website to make sure the Obfuscation will work correctly. - 0.63 Iteration 1 Strip Functions result: Output 714 lines, stripped 3695 Func lines and 5493 Commentlines - ### C:\Program Files (x86)\AutoIt3\SciTE\Au3Stripper\Au3Stripper.dat missing... Please get it from the website to make sure the Obfuscation will work correctly. - 0.88 Iteration 2 Strip Variables result: Output 213 lines and stripped 501 lines - ### C:\Program Files (x86)\AutoIt3\SciTE\Au3Stripper\Au3Stripper.dat missing... Please get it from the website to make sure the Obfuscation will work correctly. - 0.88 Iteration 3 Strip Variables result: Output 196 lines and stripped 17 lines - ### C:\Program Files (x86)\AutoIt3\SciTE\Au3Stripper\Au3Stripper.dat missing... Please get it from the website to make sure the Obfuscation will work correctly. - 1.00 Iteration 4 Strip Variables result: Output 195 lines and stripped 1 lines - ### C:\Program Files (x86)\AutoIt3\SciTE\Au3Stripper\Au3Stripper.dat missing... Please get it from the website to make sure the Obfuscation will work correctly. - 1.00 Iteration 5 Strip Variables result: Output 195 lines and stripped 0 lines +> Source 10019 lines 541342 Characters. +> Stripped 4214 Func/Var lines and 5493 comment lines, Total 533053 Characters. +> Saved 96% lines 98% Characters. +> 1 Au3Stripper v1.2.0.0 finished created:\\domain\folder$\username\Documents\AutoIT\Prosjekter\Lock'n\Lock'n_stripped.au3 +>13:05:11 Au3Stripper ended.rc:0 >Running AU3Check (3.3.10.2) from:C:\Program Files (x86)\AutoIt3 input:\\domain\folder$\username\Documents\AutoIT\Prosjekter\Lock'n\Lock'n_stripped.au3 "\\domain\folder$\username\Documents\AutoIT\Prosjekter\Lock'n\Lock'n_stripped.au3"(129,26) : error: _Exit(): undefined function. GUISetOnEvent(-3, '_Exit') ~~~~~~~~~~~~~~~~~~~~~~~~~^ "\\domain\folder$\username\Documents\AutoIT\Prosjekter\Lock'n\Lock'n_stripped.au3"(139,33) : error: _Lock(): undefined function. GUICtrlSetOnEvent($b_cr, '_Lock') ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "\\domain\folder$\username\Documents\AutoIT\Prosjekter\Lock'n\Lock'n_stripped.au3"(153,31) : error: _Apply(): undefined function. GUICtrlSetOnEvent(-1, '_Apply') ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ \\domain\folder$\username\Documents\AutoIT\Prosjekter\Lock'n\Lock'n_stripped.au3 - 3 error(s), 0 warning(s) !>13:05:11 AU3Check ended. Press F4 to jump to next error.rc:2 +>13:05:11 AutoIt3Wrapper Finished. >Exit code: 2 Time: 5.788 Tried changing Obfuscator to Au3Stripper, but no success. It also opens a new script called Lock'n_stripped.au3 that has undefined functions. Would really love to have something like this. Cheers, Akarillon
  2. Every program ran by the script will use the same credentials and should therefor be admin. You could try making an external program that just verifies it's rights and nothing else just to test it. If you need a batch command that always requires admin rights you can test with "net session".
  3. Wouldn't this work with a simple...? ControlSend()
  4. Hello and welcome to the forum. You could easily put this into an endless loop. To use the While 1 that you have in your script you will need to put a WEnd at the bottom(I guess you just didn't post your whole script, but had to tell you anyways). $pop2 is another variable and counts only what you tell it to. Therefor it will take $pop(35000000) and substract 1. The problem here is that it does nothing to $pop and this value will still be the same. So when $pop2 does it's thing again, it starts all over. You could easily avoid this by doing the following: $pop = 35000000 While 1 $pop = $pop - 1 _IENavigate($oIE, "http://www.roblox.com/User.aspx?id=" & $pop) Hope this helps. Akarillon
  5. I think I found the solution. For some reason, my domain admin user couldn't run the script, but my personal user could run it smoothly. Sorry for not understanding Water.
  6. ShellExecute has the same problems as _RunDos() and Run(). It won't run the script if I have the #RequireAdmin in my script. FileChangeDir didn't do anything(with or without #RequireAdmin).
  7. I tried using the Run() command, but as it didn't work I ended up using _RunDOS() I tried again, and Run() simply wont run the software. The UAC prompts, but nothing happens. Could there be a problem with Run() and network paths?
  8. It does work if I remove the #RequireAdmin in the script. The FileGetShortName shouldn't be a problem but checked nontheless. I do get a shortened pathname which is that I want(because the path contains spaces). Heres a picture of the parts that gets shortened. I manage to run the software when I remove the #RequireAdmin from the script, but then the UAC prompts only when the script gets to the installation bit. This creates several problems as I want to install several pieces of software in one go.
  9. Yes, the UAC asks for admin rights, but when I enter my credentials the script stops. It doesn't give any error messages, and tells me it ran smoothly. >Exit code: 0 Time: 6.823
  10. I actually found that the script wont run at all when I add the #RequireAdmin. No matter where I put a MsgBox() it won't show anything before the script exits. Got any advice?
  11. The network share should be the same for admins and users as I am using the direct path "servernamefolder$.....". Anyways it should work without these changes as I am running the script with my admin account and not a user.
  12. Hello everyone. I have been a while away from AutoIt and have forgotten alot. I am trying to make a script that will install software from a network location. My problem starts when I am trying to make the script more smooth by passing the "You need administrative rights to run this program". I added the "RequireAdmin" at the start of the script so that it wouldn't pop up as the software launched, but now the script doesn't even find the software. What am I not seeing? #include <Process.au3> #RequireAdmin $short = FileGetShortName("\\domain\...$\...\.. .. ..\...\SetupClient.exe") $result = FileExists($short) If $result Then MsgBox(0, "", "File exists") _RunDos('"\\domain\...$\...\.. .. ..\...\SetupClient.exe"') WinWait("SetupClient") MsgBox(0, "", "test") Else MsgBox(0, "", "File doesn't exist") EndIf
  13. You could run the autoit script as an admin so the executable has administrative rights. Just add #RequireAdmin at the top of your script.
  14. Yea, that should work. Thanks! About the gaming tag. The rule clearly states:" Launching, automation or script interaction with games or game servers, regardless of the game." And I am not doing any of those. The reason I wrote gaming on the button is because that is what I usually do. I could change the name to "work".
  15. Thanks man! Did not think about that. I was a little bit slow replying, but was busy during the weekend. Here's the script I got working. Did not find any way to detect what screen was active so added a 2 button activation popup. #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile_x64=..Compilex64ScreenResolution.exe #AutoIt3Wrapper_Compression=4 #AutoIt3Wrapper_UseX64=y #AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include #include #include #region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 258, 114, 401, 181) $Button1 = GUICtrlCreateButton("Gaming", 32, 24, 75, 65) $Button2 = GUICtrlCreateButton("Bed", 152, 24, 75, 65) GUISetState(@SW_SHOW) #endregion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 Run("rundll32.exe shell32.dll,Control_RunDLL desk.cpl") Sleep(500) WinSetTrans("Screen Resolution", "", 0) Sleep(150) ControlSend("Screen Resolution", "", "[CLASS:ComboBox; INSTANCE:3]", "{UP}") Sleep(150) ControlSend("Screen Resolution", "", "[CLASS:ComboBox; INSTANCE:3]", "{DOWN}") Sleep(150) ControlSend("Screen Resolution", "", "[CLASS:ComboBox; INSTANCE:3]", "{DOWN}") Sleep(150) ControlSend("Screen Resolution", "", "[CLASS:ComboBox; INSTANCE:1]", "{UP}") Sleep(150) ControlSend("Screen Resolution", "", "[CLASS:ComboBox; INSTANCE:1]", "{UP}") Sleep(150) ControlSend("Screen Resolution", "", "[CLASS:ComboBox; INSTANCE:3]", "{UP}") Sleep(150) ControlClick("Screen Resolution", "", "[CLASS:Button; INSTANCE:4]") Sleep(500) Send("{LEFT}") Sleep(150) Send("{ENTER}") Exit Case $Button2 Run("rundll32.exe shell32.dll,Control_RunDLL desk.cpl") Sleep(500) WinSetTrans("Screen Resolution", "", 0) Sleep(150) ControlSend("Screen Resolution", "", "[CLASS:ComboBox; INSTANCE:3]", "{UP}") Sleep(150) ControlSend("Screen Resolution", "", "[CLASS:ComboBox; INSTANCE:1]", "{DOWN}") Sleep(150) ControlSend("Screen Resolution", "", "[CLASS:ComboBox; INSTANCE:3]", "{DOWN}") Sleep(150) ControlSend("Screen Resolution", "", "[CLASS:ComboBox; INSTANCE:1]", "{UP}") Sleep(150) ControlSend("Screen Resolution", "", "[CLASS:ComboBox; INSTANCE:3]", "{DOWN}") Sleep(150) ControlSend("Screen Resolution", "", "[CLASS:ComboBox; INSTANCE:3]", "{DOWN}") Sleep(150) ControlClick("Screen Resolution", "", "[CLASS:Button; INSTANCE:4]") Sleep(500) Send("{LEFT}") Sleep(150) Send("{ENTER}") Exit EndSwitch WEnd
  16. Maybe I didn't make myself clear. I want to change the active screen, not a window. At the moment I use the Screen Resolution setting like the screenshot shown in the image. But since I am doing this 2-3 times a day I really want to automate it.
  17. I am trying to make a script that changes the active display screen. I got a setup with 3 screens and can only have 2 active screens at the same time, so I want to automate the process by making a script for it. Screen 1(Main) and 2(Extended) are my main screens. I also got a third screen that I use for watching movies and such. I've tried searching both the forum and google for relevant problems, but I can't seem to find anything. Also tried looking for the display settings in the registry, but gave up searching without any idea what to look for. Do you guys got any tips? Regards, Akarillon
  18. Long story short, I want to use something resembling listview that is editable. Something looking like the above view in this picture(Points:). It should be able to add new rows and columns. Tried a few things like listview, combobox and groupbox, but couldn't figure out how =/
  19. Why does the mouse pointer have to vanish? Just lock it in place at the bottom or something with _MouseTrap.
  20. When trying to tab my way to the Login-button in my program it instantly activates it even without me pressing anything else than tab. Tried to make a: Case Send('{ENTER}') ExitLoop But no results. Is there any other way to make the button activate when I press enter and not activate when tabbed onto? Thanks for all help #region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile_x64=..\Compilation\DeloitteADController.exe #AutoIt3Wrapper_Compression=4 #AutoIt3Wrapper_UseX64=y #endregion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <AD.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <EditConstants.au3> #region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 262, 145, 193, 124) $Username = GUICtrlCreateInput("", 112, 24, 121, 21) $Password = GUICtrlCreateInput("", 112, 64, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_PASSWORD)) GUICtrlCreateLabel("Username", 24, 24, 52, 17) GUICtrlCreateLabel("Password", 24, 64, 50, 17) $Login = GUICtrlCreateButton("Login", 24, 104, 75, 25) $Cancel = GUICtrlCreateButton("Cancel", 160, 104, 75, 25) GUISetState(@SW_SHOW) #endregion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE, $Cancel Exit Case Send('{ENTER}') ExitLoop Case $Login ExitLoop EndSwitch WEnd _AD_Open(GUICtrlRead($Username), GUICtrlRead($Password)) If @error Then Exit MsgBox(16, "Active Directory Example Script", "Function _AD_Open encountered a problem. @error = " & @error & ", @extended = " & @extended) Global $iReply = MsgBox(308, "Active Directory Functions - Example 1", "This script adds a user to a group." & @CRLF & @CRLF & _ "Are you sure you want to change the Active Directory?") If $iReply <> 6 Then Exit #region ### START Koda GUI section ### Form= Global $Form1 = GUICreate("Active Directory Functions - Example 1", 514, 124) GUICtrlCreateLabel("User account (FQDN or samAccountName):", 8, 10, 231, 17) GUICtrlCreateLabel("Group name (without leading CN=):", 8, 42, 231, 17) Global $lUser = GUICtrlCreateInput(@UserName, 241, 8, 259, 21) Global $IGroup = GUICtrlCreateInput("", 241, 40, 259, 21) Global $BOK = GUICtrlCreateButton("Assign user to group", 8, 72, 121, 33) Global $BCancel = GUICtrlCreateButton("Cancel", 428, 72, 73, 33, BitOR($GUI_SS_DEFAULT_BUTTON, $BS_DEFPUSHBUTTON)) GUISetState(@SW_SHOW) #endregion ### END Koda GUI section ### While 1 Global $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE, $BCancel Exit Case $BOK Global $sUser = GUICtrlRead($lUser) Global $sGroup = GUICtrlRead($IGroup) ExitLoop EndSwitch WEnd Global $iValue = _AD_AddUserToGroup($sGroup, $sUser) If $iValue = 1 Then MsgBox(64, "Active Directory Functions - Example 1", "User '" & $sUser & "' successfully assigned to group '" & $sGroup & "'") ElseIf @error = 1 Then $sStrippedGroup = StringStripWS($sGroup, 8) Global $iStrippedValue = _AD_AddUserToGroup($sStrippedGroup, $sUser) If @error = 1 Then MsgBox(64, "Active Directory Functions - Example 1", "Group '" & $sGroup & "' does not exist") EndIf ElseIf @error = 2 Then MsgBox(64, "Active Directory Functions - Example 1", "User '" & $sUser & "' does not exist") ElseIf @error = 3 Then MsgBox(64, "Active Directory Functions - Example 1", "User '" & $sUser & "' is already a member of group '" & $sGroup & "'") Else MsgBox(64, "Active Directory Functions - Example 1", "Return code '" & @error & "' from Active Directory") EndIf _AD_Close()
  21. Finally worked. Thanks water and BrewManNH!
  22. Ye, both "Username" and "DomainUsername" works.. Maybe there is a security feature I do not know about?
  23. Tried exactly what you wrote, but still the same error =/
  24. I am using version 1.2.0 Windows 7 64-bit(program also runs in 64-bit. Windows login name: "Akarillon" EDIT: When I use the other method that worked, it goes straight past the @error and into the next MsgBox even when the username and password is "Username" and "Password"
  25. Function _AD_Open encoutered a problem. @error = 1326, @extended = 0
×
×
  • Create New...