-
Posts
146 -
Joined
-
Last visited
Content Type
Forums
Downloads
Forum Articles
Events
Everything posted by blckpythn
-
Automatic lyrics grabber for mp3 music v0.5
blckpythn replied to mvk25's topic in AutoIt Example Scripts
Can you repost the download link? -
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.
-
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?
-
The help file is a wonderful thing. https://www.autoitscript.com/autoit3/docs/functions/RunAs.htm
-
get telephone number from AD
blckpythn replied to hemichallenger's topic in AutoIt General Help and Support
#include <AD.au3> _AD_Open() ConsoleWrite(_AD_GetObjectAttribute(@UserName, "telephoneNumber") & @CRLF) _AD_Close() Works for me. -
Join A Domain and Change Computer Name (windows 7)
blckpythn replied to shocked's topic in AutoIt General Help and Support
You might also benefit from NetDom. -
Mind explaining too since your video is only 360p? Is it the text color? Because that doesn't sound too serious.
-
Using list to replace a value in multiple files
blckpythn replied to mrmacadamia's topic in AutoIt General Help and Support
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. -
Using list to replace a value in multiple files
blckpythn replied to mrmacadamia's topic in AutoIt General Help and Support
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. -
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.
-
I've tried this in the past, Ninite detects this and shows itself again.
-
FileCopy to UNC path......strange issue
blckpythn replied to hogfan's topic in AutoIt General Help and Support
Do your paths need quotes? Example: FileCopy('"' & $source & '"', '"' & $dest & '"', 9) -
PixelSearch should work fine with most applications, but not for programs that use DirectX or OpenGL, for which you won't get any help.
-
read/write ini data directly from/to text variables
blckpythn replied to a topic in AutoIt Example Scripts
I only looked through your code briefly, but what sets this apart from the native INI read/write functions? -
How to click on this button? HELP!!!
blckpythn replied to bbraga's topic in AutoIt General Help and Support
What site is this? -
Right-Justified Taskbar items
blckpythn replied to blckpythn's topic in AutoIt General Help and Support
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. -
Right-Justified Taskbar items
blckpythn replied to blckpythn's topic in AutoIt General Help and Support
Nope, these are more like tray icons, but they aren't in the tray area. -
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.
-
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!
-
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.
-
Would that make any difference while the script is frozen on a COM object?
-
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.
-
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
-
-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.