Jump to content

blckpythn

Active Members
  • Posts

    146
  • Joined

  • Last visited

Everything posted by blckpythn

  1. Can you repost the download link?
  2. I like it, one thing I would change is the decimal increase in cookies. After only a few minutes I managed to get 74.89999999999 cookies. Maybe after the counter has reached 1.0+ cookies per second, remove the decimals from the current cookie count? In fact, you may want to strip them entirely to avoid memory issues later.
  3. You can build a small GUI that prompts for it or use two Input Boxes. Here's a GUI example: #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> Opt("GUIOnEventMode", 1) $fLogin = GUICreate("Enter Credentials", 450, 200) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") $lText = GUICtrlCreateLabel("Please enter username and password", 45, 16, 340, 28, $SS_CENTER) $iCredsUser = GUICtrlCreateInput("", 120, 55, 265, 20) $iCredsPass = GUICtrlCreateInput("", 120, 85, 265, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_PASSWORD)) $lUser = GUICtrlCreateLabel("Username:", 10, 55, 95, 20, $SS_RIGHT) $lPass = GUICtrlCreateLabel("Password:", 10, 85, 95, 20, $SS_RIGHT) $bRun = GUICtrlCreateButton("Run", 16, 160, 100, 30) $bCancel = GUICtrlCreateButton("Cancel", 317, 160, 100, 30) GUICtrlSetOnEvent(-1, "_Exit") GUISetState(@SW_SHOW) While 1 Sleep(100) WEnd Func _Exit() GUIDelete($fLogin) Exit EndFunc ;==>_Exit Users are usually prompted for credentials when running something that requires administrative access anyhow, have you tried #requireadmin?
  4. The help file is a wonderful thing. https://www.autoitscript.com/autoit3/docs/functions/RunAs.htm
  5. #include <AD.au3> _AD_Open() ConsoleWrite(_AD_GetObjectAttribute(@UserName, "telephoneNumber") & @CRLF) _AD_Close() Works for me.
  6. You might also benefit from NetDom.
  7. Mind explaining too since your video is only 360p? Is it the text color? Because that doesn't sound too serious.
  8. The FileListToArray method doesn't return the whole path, only the filenames. So unlike reading a file with the full paths, you would have to specify the path leading up to the filenames.
  9. Arrays and For loops. #include <File.au3> Global $array Global $array2 _FileReadToArray("C:\users\%username%\desktop\animal.txt", $array) _FileReadToArray("C:\users\%username%\desktop\file2.txt", $array2) For $i = 1 To $array[0] _ReplaceStringInFile($array2[$i], "something", $array[$i]) Next In this example file2.txt has: C:\users\%username%\desktop\mypet-1.txt C:\users\%username%\desktop\mypet-2.txt C:\users\%username%\desktop\mypet-3.txt C:\users\%username%\desktop\mypet-4.txt If you want to change the text for all txt files in a directory until you run out of words in your animals.txt you can replace: _FileReadToArray("C:users%username%desktopfile2.txt", $array2) With $array2 = _FileListToArray("C:path-to-folder-with-myfiles") And change the ReplaceString function to_ReplaceStringInFile("C:path-to-folder-with-myfiles" & $array2[$i], "something", $array[$i]) *Edited for a few revisions after I reread replacing the string instead of simply writing it to the file.
  10. I'm not saying that you can't create apps based on that, just that people will be very skeptical of your intentions. Not only that but any code or suggestions provided could likely be used by those with poor intentions. That's half the reason that discussing games is against the rules.
  11. I've tried this in the past, Ninite detects this and shows itself again.
  12. Do your paths need quotes? Example: FileCopy('"' & $source & '"', '"' & $dest & '"', 9)
  13. PixelSearch should work fine with most applications, but not for programs that use DirectX or OpenGL, for which you won't get any help.
  14. I only looked through your code briefly, but what sets this apart from the native INI read/write functions?
  15. You could have the main .au3 file on an FTP server or something and have a seperate "client" script that first copies it locally before executing as JohnOne suggested, then delete before exit. This would make updates easier as well.
  16. Close, but that doesn't create the button look that is shown above. I wish I had a program that already does this to investigate, but that isn't my screenshot.
  17. Nope, these are more like tray icons, but they aren't in the tray area.
  18. I'm curious, is it possible to create items like this in AutoIt? Or perhaps with another tool that links to a script I write? EDIT: Just to note, these are not the regular taskbar buttons and shortcuts simply moved to the right side. They are seperate.
  19. That helped, still needed additional quotes for the GuiCtrlRead returns, now its working! Run(@AutoItExe & ' /AutoIt3ExecuteLine "If WinWaitActive(""cmdlet"") Then ConsoleWrite(ControlSetText(""cmdlet"", """", ""[NAME:m_UserName]"", ""' & GUICtrlRead($iUsername) & '"") & ControlSetText(""cmdlet"", """", ""[NAME:m_Password]"", ""' & GUICtrlRead($iPassword) & '"") & ControlClick(""cmdlet"", """", ""[NAME:m_OK]"", ""left""))"') Thank you!
  20. I like your style! I didn't realize you could execute a string with ExecuteLine, I thought it had to be in reference to a file. However, I'm getting this error message: This is with an exact copy of your line, I think the layers of quotes are causing a problem.
  21. Would that make any difference while the script is frozen on a COM object?
  22. I suppose so, since I can't seem to get around the fact that the whole script freezes. Is there a way to run those six lines in a new process without a second file? I want to deploy the end result of this utility to some clients to use for password resets.
  23. I already have, but "passing it to the cmdlets" isn't an option, it will always prompt. Thus I take what they typed into my GUI and Send it to the window that pops up. I have worked around it for the time being by executing a 6 line script like so. If GUICtrlRead($cAuto) = $GUI_CHECKED Then Run('"' & @ScriptFullPath & '"' & ' /AutoIt3ExecuteScript "' & @ScriptDir & '\EnterCreds.au3" ' & GUICtrlRead($iUsername) & " " & GUICtrlRead($iPassword) & " cmdlet") ExecuteCmd("$LiveCred = Get-Credential") In the EnterCreds.au3 file is: If $CmdLine[0] <> 3 Then Exit If WinWaitActive($CmdLine[3], "", 10) <> 0 Then ControlSetText($CmdLine[3], "", "[NAME:m_UserName]", $CmdLine[1]) ControlSetText($CmdLine[3], "", "[NAME:m_Password]", $CmdLine[2]) ControlClick($CmdLine[3], "", "[NAME:m_OK]", "left") EndIf
  24. -Credential can be passed only after my initial usage of Get-Credential(Which is one of the first things I run). Get-Credential will NOT accept passwords, and I have found no way to force it to.
×
×
  • Create New...