
sb1920alk
Active Members-
Posts
96 -
Joined
-
Last visited
sb1920alk's Achievements

Wayfarer (2/7)
0
Reputation
-
Sorry, I'm having the same issue with that change.
-
I'm trying to make a hotkey (Ctrl-Shift-v) to type the contents of the clipboard for use in situations where a traditional "paste" doesn't work for whatever reason. The problem I'm having is that the script seems to break my regular shift and ctrl keys, as if they're stuck down. I have to exit the script and press and release the "stuck" keys to fix it. Any ideas? Here is the script: ;Set Hotkey of Ctrl-Shift-V to type clipboard text. ;Useful for situations that don't permit traditional pasting #include <Clipboard.au3> HotKeySet("+^v", "TypeClipText") HotKeySet("{ESC}", "Terminate") While 1 Sleep(100) WEnd Func TypeClipText() $Text = ClipGet ( ) Send($Text,1) EndFunc Func Terminate() Exit 0 EndFunc ;==>Terminate
-
I'm trying to see if someone has already written a script like this. I would like to manually arrange my open program windows, then have the script take a snapshot of the size and position of all of the windows. After time passes and I've moved things around I would like to be able to run a script to restore my windows to the position and size previously saved. Taking it further, I would like it to start applications that aren't started if they're part of the collection of windows (for example if Outlook is one of the windows and I closed it while working, then the restore script would restart Outlook when necessary), and save and restore between multiple snapshots. These different snapshots could be for different types of tasks (development, emailing, browsing, or whatever). Thanks,
-
I would like to know if it's possible to watch for a button, and if it's clicked, trigger some code. Specifically: I have a legacy application that to print, takes a screen shot of the application window, opens a print dialogue box, then sends the screen shot to the chosen printer. On Windows XP, that was fine. On Windows 7, it's actually including the print dialogue box in the printout. ...already contacted the vendor and it's unlikely they're going to do anything about it. So, if I could monitor the "Print" button on the print dialogue box, when the user clicks "Print" I could trigger a function to move the box or make it hidden or something, then click the "Print" button. I'm comfortable with everything in the script except the "Monitor_a_control_and_do_something_before_it_does_what_it_was_originally_intended_to_do" feature. FYI, I've already tried remapping the printscreen key to dump a screen shot to a file, then print it. That sort-of works, but the legacy app isn't using a pure screenshot. Instead, it's doing some things with the layout that the users are used to and I haven't been able to reproduce all of those settings.
-
Trying to read specific text from file
sb1920alk replied to JLogan3o13's topic in AutoIt General Help and Support
...just to make sure you know it's an option. defrag c: -a -v -
Trying to read specific text from file
sb1920alk replied to JLogan3o13's topic in AutoIt General Help and Support
If "unfragmented" and "fragmented" only appear once in the log, you can real the whole file to a variable, split it by lines, then loop through the array of lines. In the loop, if the line contains "unfragmented", use text manipulation to pull out the bytes and set a variable equal to it. Use a different variable for "fragmented". Look at fileread, stringsplit, for...in...next, stringinstr -
Rename Folder as ComputerName
sb1920alk replied to RedSoxGeek's topic in AutoIt General Help and Support
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop\TaskbarWinXP, I think is what you're looking for, but it's ugly. I'm pretty sure changes you set artificially will be lost when the user logs off. You can set it in a startup script that loops through each user's hive and imports a template from a reg file you make from a reference machine...I guess. Also consider editing your Default User settings to include this. -
Rename Folder as ComputerName
sb1920alk replied to RedSoxGeek's topic in AutoIt General Help and Support
Well, you can customize it so it doesn't show all of the information. If you do plan to deploy it, I would probably put it and the configuration file in netlogon, and call it from the logon script. ...so, the end users will be clicking on the toolbar to open the folder, or launch a script or exe? I'm not sure what you mean here. -
Rename Folder as ComputerName
sb1920alk replied to RedSoxGeek's topic in AutoIt General Help and Support
...just being thorough. http://technet.microsoft.com/en-us/sysinternals/bb897557.aspx -
Rename Folder as ComputerName
sb1920alk replied to RedSoxGeek's topic in AutoIt General Help and Support
If your goal is to have users quickly identify their computer name, you could set HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\LocalizedString to %computername%. Then instead of "My Computer", My Computer will be their computer name. It's not a toolbar, but... -
Can't Open the CD tray in WinPE
sb1920alk replied to sb1920alk's topic in AutoIt General Help and Support
mciSendStringW failed with first call Error code number = 306 ...click OK... mciSendStringW failed with second call Error code number = 306 ...click OK... mciSendStringW failed with third call Error code number = 263 -
Can't Open the CD tray in WinPE
sb1920alk replied to sb1920alk's topic in AutoIt General Help and Support
I have not worked with DllCalls much before. -
Can't Open the CD tray in WinPE
sb1920alk replied to sb1920alk's topic in AutoIt General Help and Support
That worked. Very nice...thank you. I much prefer code I can see rather than a black box like the exe above I found. I still wonder why CDTray didn't work. -
Can't Open the CD tray in WinPE
sb1920alk replied to sb1920alk's topic in AutoIt General Help and Support
I have a solution now, so it's not a big deal. I tried adding the scripting package and running this vbscript: Const CDROM = 4 For Each d in CreateObject("Scripting.FileSystemObject").Drives If d.DriveType = CDROM Then Eject d.DriveLetter & ":\" End If Next Sub Eject(CDROM) Dim ssfDrives ssfDrives = 17 CreateObject("Shell.Application")_ .Namespace(ssfDrives).ParseName(CDROM).InvokeVerb("E&ject") End Sub ...but it did nothing. Since I already added the scripting package, I tried this: Set oWMP = CreateObject("WMPlayer.OCX.7" ) Set colCDROMs = oWMP.cdromCollection For i = 0 to colCDROMs.Count - 1 colCDROMs.Item(i).Eject Next ...but it errored (no WMP in WinPE). Running the original au3 as adminitrator didn't help. I stumbled across this link: http://memberwebs.com/stef/software/eject/eject.exe, and it worked fine. Obviously, I would prefer not to have to rely on a helper file, but it's good enough for now. If anyone can get the tray to open in WinPE 3.0 with pure AutoIT code, or vbscript, please let me know. Thanks, -
Can't Open the CD tray in WinPE
sb1920alk replied to sb1920alk's topic in AutoIt General Help and Support
No error. Running your code did nothing visible. I tried msgbox too, but still no. Then I ran the code below to make sure it was doing something. I get a message box with d: in it. So...it can list the drives, but the CDTray function isn't doing anything. Also, if I open Notepad, File->Open, right-click on the cd drive, and select "Eject", it really does eject, so WinPE has the ability to open the tray. I added @error to my message box and it's returning 0, so CDTray thinks it's locked or it's not a CD drive or something, even though DriveGetDrive says it is a CD drive. I'm not sure. $var = DriveGetDrive( "CDROM" ) If NOT @error Then For $i = 1 to $var[0] CDTray($var[$i],"open") MsgBox(0,"",$var[$i] & @CRLF & @error) Next Else MsgBox(0,"",@error) ConsoleWrite(@error & @CRLF) EndIf