Jump to content

Search the Community

Showing results for tags 'output'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 9 results

  1. Hi there! 😃 I've 2 simple scripts: Script 1 starts script 2 Script 1 gets executed with normal user rights (un-elevated) Script 2 contains an #RequireAdmin and therefor can only start elevated I want to read the output of script 2 with script 1 AND have the UAC of script 2 being activated as fullscreen Script 1 (Scripts location is the same as script 2 that I'm running with Run() Local $iPID, $sOutput $iPID = Run(@ComSpec & " /c " & "C:\Entwicklung\Autoit\Test\Temp.exe", @ScriptDir, @SW_HIDE, 0x2) ProcessWaitClose($iPID) $sOutput = StdoutRead($iPID) StdioClose($iPID) ConsoleWrite($sOutput) MsgBox(1, 1, 1) Script 2 (compiled as Temp.exe) #RequireAdmin ConsoleWrite("Return") MsgBox(1,1,"ADMIN") Now my problems are the following: Without the #RequireAdmin I can read the output with no problem, but not with the #RequireAdmin ($sOutput is empty) Using @SW_HIDE in the Run() command makes the UAC always start minimized (see attached picture) and the admin has to always manually click on the icon to enter his credentials since the UAC doesn't start in fullscreen. Here and on a few other sites they explain that the program launching the elevated program NEEDS to be activated in order to directly show the UAC fullscreen and not minimized. Using @SW_SHOW would get rid of the problem, BUT that leaves me with an ugly cmd.exe floating the whole time while the elevated script ist running. And my questions to that I'm seeking an answer for are: Problem 1: Is it just not possible to read from an elevated program with an un-elevated user/script? I also get the Access Denied if I press No on the UAC as an Output in $sOutput (Guess since its's still un-elevated) Problem 2: Is there a way to either make the floating black and blank cmd.exe being moved to the background and be non visible to the user OR to somehow bring the minimized UAC to the foreground/fullscreen? What I already tried and what didn't help me: $iPID = Run(@ComSpec & " /c " & "C:\Entwicklung\Autoit\Test\Temp.exe", @ScriptDir, @SW_HIDE, 0x2) While Not WinExists("Temp.exe erfordert Ihre Berechtigung") ConsoleWrite(1) WEnd WinActivate("Temp.exe erfordert Ihre Berechtigung") WinSetState("Temp.exe erfordert Ihre Berechtigung", WinGetText("Temp.exe erfordert Ihre Berechtigung"), @SW_SHOW) WinSetState("Temp.exe erfordert Ihre Berechtigung", WinGetText("Temp.exe erfordert Ihre Berechtigung"), @SW_MAXIMIZE) WinSetState("Temp.exe erfordert Ihre Berechtigung", WinGetText("Temp.exe erfordert Ihre Berechtigung"), @SW_ENABLE) The While-Loops helps a lot and also stops after a second or so (► Stops to write ones (1)). That means that the actual "window" of the UAC is found, but all the WinXXX functions don't do anything and the UAC stays minimized. I also tried to minimized/move the cmd.exe to the background with WinActivate() and WinSetState() with no success. $iPID = ShellExecute("C:\Entwicklung\Autoit\Test\Temp.exe", "", @ScriptDir, "open", @SW_HIDE) Using ShellExecute() instead of Run() completely solves the UAC to fullscreen problem BUT I haven't found a consistent way to read the output of ShellExecute(). Neither here on the forum nor somewhere else. If I'd be possible to read the output from ShellExecute() then all my problems would be solved at once! Also tried a few more things and playing with some parameters but everything with no success. I'd really love some help and support here from you. Thanks in advance!
  2. I/O Port Functions UDF Windows 7 and x64-compatible! This is a simple I/O (Input/Output) UDF for interacting with ports. The ability to write to ports was stripped from Windows with Vista+. While many do not miss this ability, there are some uses still in existence: Re-enable the internal PC Speaker - the good ol' "Beep" function can be restored using basic I/O PS/2 Keyboard Functions - Turn it off/on, mess with LED's, inject keys into the keyboard output stream - even thwart UAC prompts! =O Also work with Parallel, Serial (COM), PS/2 mouse, and miscellaneous ports that devices interface through using I/O operations For some good lists of ports and programming, see: PORTS.LST Chapters from 'The Art of Assembly Language': 20: The PC Keyboards - Part One and Part Two 21: The PC Parallel Ports - Part One, Part Two, and Part Three 22: The PC Serial Ports - Part One and Part Two 23: The PC Video Display 24: The PC Game Adapter - Part One, Part Two, Part Three and Part Four On the PS/2 Keyboard and PS/2 Mouse, some more links: 8042 Keyboard Controller 8042 Keyboard Commands & Responses Keyboard Controller Commands, Keyboard Commands and Keyboard Scancodes The PS/2 Mouse The I/O DLL's, which will install the I/O drivers (they are embedded as a resource in the DLL), come from Phillip Gibbons. His webpage, where more information, and extra downloads are, is available here: InpOut32 and InpOutx64. Note: everything you need is already included in my UDF. IOInstallx86 and IOInstallx64 are included to help with the install. Run these once to install the DLL's and drivers. (Administrator rights are required!) In addition to the base _IOFunctions UDF, I've included _IOBeep, which is based on trancexx's _Beep function, and _IOKeyboardFunctions [PS/2 only*]. There are now three examples of the UDF usage included: IOBeepExample, IOCMOSReadExample (based on trancexx's CMOS code), and IOKeyboardExamples. If anyone else has more code suggestions, feel free to add to the thread. *Update: Some BIOS's allow Legacy USB Port 64/60 Emulation, which may allow the _IOKeyboardFunctions to work for USB (non-PS/2) Keyboards, though this is untested thus far. While I bundle the binaries with my code, remember they are not my own. However, they are released as freeware. To ensure proper credit goes where it belongs, I've included the Readme files from the download (linked above), as well as a link to the original page. Ascend4nt's AutoIT Code License agreement Screw silly licenses. Just make sure you remember the people you get free stuff from! IOFunctions.zip UPDATES: 07/11/2013: - Updated to use (and install) v1.5.0.0 of InpOut32 & InpOutx64 - Version check & compare before install - Fixed links - Tiny bug fixes InpOut32 and InpOutx64 ChangeLog: v1.5.0.0 New Build (20-Jan-2011): - Added _stdcall to DlPortReadPortUshort, DlPortWritePortUshort, DlPortReadPortUlong, DlPortWritePortUlong to maintain compatibility with old DLPortIO driver. v1.4.0.0 New Build (13-Jan-2011): - Removed references to WinRing0 which was discontinued. - Fixed uninitialized buffers & return from Inp32 > byte value! v1.3.0.0 New Build (15-Aug-2010): - Removed bool's from header (replaced with BOOL). This is to maintain compatibility with other DLL’s (DLPortIO etc.). 10/22/2010: Added _IOKeyboardFunctions UDF Added IOKeyboardExamples and IOCMOSReadExample (based on trancexx's CMOS code)
  3. Hello my friends I have an urgent problem and we hope you can help me I want to detect if the audio output of the device has changed Such as the headset is connected or disConnected. or change the default audio output Is this possible? I really searched a lot and found suggestions but unfortunately I did not understand them Please explain to me Greetings
  4. Hi guys I'm looking for how to detect if the default audio output has changed During my research I found this file I did not know how to use it can anyone guide me how it works please. Thanks in advance audioOutputIsChanged.au3
  5. i'm trying to create a program that let's the user type a word in an input field (gui) and when a button is pressed the letters of the word are replaced by 1 word each from a list of words in a text file i created the gui for it but i need help to add some more code to make it work like intented each letter of a word should be replaced by a word from a text file the text file is a source for replacing letters is a file with 2 columns separated by tab that contains the entire alphabet (26 rows) please help if possible i posted an example gui screenshot
  6. I have a question About the Output from a Var which looks like : 34.32132312321 How to make it work that it looks like : 34.321 I already searched through some AutoIt Includes >.< I hope somebody can help by this $Byte = InetGetSize(http://download853.mediafire.com/albf2b2g21bg/6tkd4gb68qdb7hd/Anime+Pics.rar,0);Download Size in Byte(Just an old Pic File) If $Byte > 1024 Then $Kilobyte = $Byte / 1024;Converting Byte to Kilobytes If $Kilobyte > 1024 Then $Megabyte = $Kilobyte / 1024;Converting Kilobyte to Megabyte If $Megabyte > 1024 Then $Gigabyte = $Megabyte / 1024;Converting Megabyte to Gigabyte If $Gigabyte > 1024 Then $Terabyte = $Gigabyte / 1024;Converting Gigabyte to Terabyte If $Terabyte > 1024 Then $Petabyte = $Terabyte / 1024;Converting Terabyte to Petabyte If $Petabyte > 1024 Then $Exabyte = $Petabyte / 1024;Converting Petabyte to Exabyte $_SIZE1 = $Exabyte & " EB" ElseIf $Petabyte < 1024 Then $Petabyte = $Terabyte / 1024 $_SIZE1 = $Petabyte & " PB" EndIf ElseIf $Terabyte < 1024 Then $Terabyte = $Gigabyte / 1024 $_SIZE1 = $Terabyte & " TB" EndIf ElseIf $Gigabyte < 1024 Then $Gigabyte = $Megabyte / 1024 $_SIZE1 = $Gigabyte & " GB" EndIf ElseIf $Megabyte < 1024 Then $Megabyte = $Kilobyte / 1024 $_SIZE1 = $Megabyte & " MB" EndIf ElseIf $Kilobyte < 1024 Then $Kilobyte = $Byte / 1024 $_SIZE1 = $Kilobyte & " KB" EndIf ElseIf $Byte < 1024 Then $_SIZE1 = $Byte & " Bytes" EndIf MsgBox(52,"Title","Size is: " & $_SIZE1)
  7. I have spent the past couple of hours trying to find a solution to this. Is there a way to output the data from a RunWait to a text file? I need to use the RunWait as I need each command to complete before the next one starts. Any help would be greatly appreciated. I have tried RunWait(@ComSpec & " /c " & GUICtrlRead($hLetter) & ":&&cd\" & GUICtrlRead($hPath) & "&&TAKEOWN /f " & GUICtrlRead($hFolder) & " /r /d y" > "C:\log.txt", "", @SW_HIDE) But that does not work either. Here is my code: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <MsgBoxConstants.au3> ;=============Main=GUI================= $hGUI = GUICreate("", 250, 500) ;====================================== ;=================Inputs=============== $hOld = GUICtrlCreateInput("", 95, 25, 130) $hNew = GUICtrlCreateInput("", 95, 50, 130) $hOldSvr1 = GUICtrlCreateInput("", 95, 75, 25) GUICtrlSetLimit(-1, 3) $hOldSvr2 = GUICtrlCreateInput("", 130, 75, 25) GUICtrlSetLimit(-1, 3) $hOldSvr3 = GUICtrlCreateInput("", 165, 75, 25) GUICtrlSetLimit(-1, 3) $hOldSvr4 = GUICtrlCreateInput("", 200, 75, 25) GUICtrlSetLimit(-1, 3) $hNewSvr1 = GUICtrlCreateInput("", 95, 100, 25) GUICtrlSetLimit(-1, 3) $hNewSvr2 = GUICtrlCreateInput("", 130, 100, 25) GUICtrlSetLimit(-1, 3) $hNewSvr3 = GUICtrlCreateInput("", 165, 100, 25) GUICtrlSetLimit(-1, 3) $hNewSvr4 = GUICtrlCreateInput("", 200, 100, 25) GUICtrlSetLimit(-1, 3) $hLetter = GUICtrlCreateInput("", 95, 125, 130) $hPath = GUICtrlCreateInput("", 95, 150, 130) $hFolder = GUICtrlCreateInput("", 95, 175, 130) $hUID = GUICtrlCreateInput("", 95, 200, 130) $hExclude = GUICtrlCreateInput("", 95, 225, 130) ;====================================== ;=================Buttons============== $hButton1 = GUICtrlCreateButton("Test", 50, 260, 50) ;====================================== ;=================Labels=============== $hLabel1 = GUICtrlCreateLabel("Old Domain", 10, 28) $hLabel2 = GUICtrlCreateLabel("New Domain", 10, 53) $hLabel3 = GUICtrlCreateLabel("Old Server (IP)", 10, 78) $hLabel4 = GUICtrlCreateLabel("New Server (IP)", 10, 103) $hLabel5 = GUICtrlCreateLabel("Drive Letter", 10, 128) $hLabel5 = GUICtrlCreateLabel("Folder Path", 10, 153) $hLabel6 = GUICtrlCreateLabel("Folder Name", 10, 178) $hLabel7 = GUICtrlCreateLabel("User Name", 10, 203) $hLabel8 = GUICtrlCreateLabel("Exclusions", 10, 228) ;====================================== GUISetState(@SW_SHOW, $hGUI) While 1 Switch GUIGetMSG() Case $GUI_EVENT_CLOSE ExitLoop Case $hButton1 _TestOnly() EndSwitch WEnd Func _TestOnly() RunWait(@ComSpec & " /k " & GUICtrlRead($hLetter) & ":&&cd\" & GUICtrlRead($hPath) & "&&TAKEOWN /f " & GUICtrlRead($hFolder) & " /r /d y") RunWait(@ComSpec & " /k " & GUICtrlRead($hLetter) & ":&&cd\" & GUICtrlRead($hPath) & "&&icacls " & GUICtrlRead($hFolder) & " /reset /T") RunWait(@ComSpec & " /k " & GUICtrlRead($hLetter) & ":&&cd\" & GUICtrlRead($hPath) & "&&icacls " & GUICtrlRead($hFolder) & "\*.* /inheritance:d /c /t") EndFunc
  8. Could anyone please tell me how I get this application to write its information out to a notepad file? Thank you in advance. I had tried changing the code to reference "Untitled - Notepad" instead of the Product 2009 and I would think the send commands and references to buttons and specific pages would need to be removed also. For example I would like to set the $amount to say 100 and then have it write 000-00-0001, 000-00-0002 etc etc until the end of the count into the notepad file. #include <GUIConstants.au3> #include <IE.au3> $me = GUICreate("Desktop Generator", 450, 200) GUISetBkColor(0xFFFFFF) ; background color $textbox1 = GUICtrlCreateEdit("", 10, 90, 430, 100) $Pic1 = GUICtrlCreatePic("image.jpg", 300, 1, 141, 42) $Labelnumberstart = GUICtrlCreateLabel("number Start", 10, 1, 60, 20) $Estart = GUICtrlCreateInput("000-00-", 75, 1, 45, 20) $Eend = (GUICtrlCreateInput("0000", 125, 1, 40, 20)) $LabelAnount = GUICtrlCreateLabel("# ", 10, 25, 60, 20) $amount = GUICtrlCreateInput("000", 75, 25, 30, 20) $newReturn = GUICtrlCreateButton("Create ", 10, 47, 151, 20) $helpButton = GUICtrlCreateButton("Help", 10, 67, 151, 20) fRunGui() Func fRunGui() GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ; closes when red x is pressed ExitLoop Case $msg = $newReturn GUICtrlSetData($textbox1, "");deletes the text openRetrun() Case Else ;;; EndSelect WEnd EndFunc ;==>fRunGui Func openRetrun() $iCount = 0 For $count = 0 To GUICtrlRead($amount) - 1 Step 1 $numberEnd = GUICtrlRead($Eend) + $count While StringLen($numberEnd) < 4 $numberEnd = "0" & $numberEnd WEnd $number = GUICtrlRead($Estart) & $numberEnd fThrowError(@ScriptLineNumber, WinActivate("product 2009 :", "")) Send("^n") fThrowError(@ScriptLineNumber, WinWaitActive("Enter number", "", 10)) fThrowError(@ScriptLineNumber, ControlSetText("Enter number", "", "TMaskEdit3", $number)) fThrowError(@ScriptLineNumber, ControlSetText("Enter number", "", "TMaskEdit1", $number)) Send("{TAB}") If (WinExists("Confirm", "&Yes")) Then fThrowError(@ScriptLineNumber, WinActivate("Confirm", "&Yes")) fThrowError(@ScriptLineNumber, ControlClick("Confirm", "", "TButton1", "left", 1)) fThrowError(@ScriptLineNumber, WinWaitActive("Enter number", "", 10)) fThrowError(@ScriptLineNumber, ControlClick("Enter number", "", "TButton3", "left", 1)) GUICtrlSetData($textbox1, "- - - - The return " & $number & " already exists" & @CRLF, 1) Else fThrowError(@ScriptLineNumber, ControlClick("Enter number", "", "TButton4", "left", 1)) fThrowError(@ScriptLineNumber, WinWaitActive("product 2009 :", "pnlNavigation", 10)) Send("!f") Send("c") fThrowError(@ScriptLineNumber, WinWaitActive("product 2009 :", "homepage.htm", 10)) GUICtrlSetData($textbox1, "- - - - The return " & $number & " Created" & @CRLF, 1) $iCount = $iCount + 1 EndIf Next; end of for statement GUICtrlSetData($textbox1, "A total of " & $iCount & " returns were created" & @CRLF, 1) EndFunc ;==>openRetrun Func fThrowError($sMessage, $iZero) If ($iZero = 0) Then MsgBox(1, "Error", "Please restart tool" & $sMessage) fRunGui() Exit EndIf EndFunc ;==>fThrowError Exit
  9. Hello my friends. When i make a button with Koda and name it ( j ) it makes it a ( i ) just a bit longer. first i thought it was a Koda bug and said i just change it in the SCITE editor, but when i am trying that it happens there too. Everything in my pc and both apps are in English language.Why is that ? screen shot :
×
×
  • Create New...