-
Posts
239 -
Joined
-
Last visited
Recent Profile Visitors
david1337's Achievements
-
Weird Script Execution Issue
david1337 replied to copyleft's topic in AutoIt General Help and Support
What happens if you start it from Windows Task Scheduler based on time. Let's say in 3 minutes from now? Does it act differently than running it at logon? -
Passing parameter as variable in Run function
david1337 replied to max23ed's topic in AutoIt General Help and Support
You're welcome -
max23ed reacted to a post in a topic: Passing parameter as variable in Run function
-
Passing parameter as variable in Run function
david1337 replied to max23ed's topic in AutoIt General Help and Support
Hi max23ed, Try with Shellexecute. ShellExecute("ussf.exe", $abc) -
Switching App Without Losing Keyboard/Mouse Focus
david1337 replied to GeekA's topic in AutoIt General Help and Support
I just tested with the Chrome windows running in full-screen. Still working! -
Switching App Without Losing Keyboard/Mouse Focus
david1337 replied to GeekA's topic in AutoIt General Help and Support
Hi GeekA, That is weird - when I have this script running, and have notepad opened, I don't lose focus in Notepad. I can type inside the notepad window, and there is no interruption? 😏 -
Switching App Without Losing Keyboard/Mouse Focus
david1337 replied to GeekA's topic in AutoIt General Help and Support
Hi GeekA, WinActivate will always take the focus. How about using WinSetState -> Minimize/Maximize like this, to cycle through your Chrome windows without taking focus: #include <Constants.au3> AutoItSetOption("WinTitleMatchMode", $OPT_MATCHANY) ;2 $Title1 = "[TITLE: ChromeTitle1;CLASS:Chrome_WidgetWin_1]" $Title2 = "[TITLE: ChromeTitle2;CLASS:Chrome_WidgetWin_1]" $Title3 = "[TITLE: ChromeTitle3;CLASS:Chrome_WidgetWin_1]" $Title4 = "[TITLE: ChromeTitle4;CLASS:Chrome_WidgetWin_1]" WinSetState($Title1,"", @SW_MINIMIZE) WinSetState($Title2,"", @SW_MINIMIZE) WinSetState($Title3,"", @SW_MINIMIZE) WinSetState($Title4,"", @SW_MINIMIZE) While 1 WinSetState($Title1,"", @SW_RESTORE) WinSetState($Title2,"", @SW_MINIMIZE) WinSetState($Title3,"", @SW_MINIMIZE) WinSetState($Title4,"", @SW_MINIMIZE) Sleep(3000) WinSetState($Title2,"", @SW_RESTORE) WinSetState($Title1,"", @SW_MINIMIZE) WinSetState($Title3,"", @SW_MINIMIZE) WinSetState($Title4,"", @SW_MINIMIZE) Sleep(3000) WinSetState($Title3,"", @SW_RESTORE) WinSetState($Title1,"", @SW_MINIMIZE) WinSetState($Title2,"", @SW_MINIMIZE) WinSetState($Title4,"", @SW_MINIMIZE) Sleep(3000) WinSetState($Title4,"", @SW_RESTORE) WinSetState($Title1,"", @SW_MINIMIZE) WinSetState($Title2,"", @SW_MINIMIZE) WinSetState($Title3,"", @SW_MINIMIZE) Sleep(3000) WEnd - David -
Script to open a fullscreen image?
david1337 replied to DojoBaggins's topic in AutoIt General Help and Support
Hi Compile your script to an exe file, and go to properties on that exe file. Play around with the DPI settings to make it use the DPI of the program and not your Windows 300% scaling. Now run your script from the exe file, and see if that does the trick -
HankHell reacted to a post in a topic: ControlSetText?
-
Okay, well then you just call the function inside your While loop? HotKeySet("{ESC}", "End") ;~ HotKeySet("{F1}", "Get_Mouse_Pos") $GUI = GUICreate("Coords", 60, 30, 0, 0) $Label_x_y = GUICtrlCreateLabel("x=" & @CRLF & "y=", 1, 0, 15, 30) $Label_x_value = GUICtrlCreateLabel("", 17, 0, 50, 13) $Label_y_value = GUICtrlCreateLabel("", 17, 15, 50, 13) GUISetState(@SW_HIDE) While 1 Sleep(100) Get_Mouse_Pos() ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< WEnd Func Get_Mouse_Pos() GUISetState(@SW_SHOW) $Mpos = MouseGetPos() $Mpos_x = $Mpos[0] $Mpos_y = $Mpos[1] GUICtrlSetData($Label_x_value, $Mpos_x) GUICtrlSetData($Label_y_value, $Mpos_y) EndFunc Func End() Exit EndFunc
-
Hi Something like this? HotKeySet("{ESC}", "End") HotKeySet("{F1}", "Get_Mouse_Pos") $GUI = GUICreate("Coords", 60, 30, 0, 0) $Label_x_y = GUICtrlCreateLabel("x=" & @CRLF & "y=", 1, 0, 15, 30) $Label_x_value = GUICtrlCreateLabel("", 17, 0, 50, 13) $Label_y_value = GUICtrlCreateLabel("", 17, 15, 50, 13) GUISetState(@SW_HIDE) While 1 Sleep(100) WEnd Func Get_Mouse_Pos() GUISetState(@SW_SHOW) $Mpos = MouseGetPos() $Mpos_x = $Mpos[0] $Mpos_y = $Mpos[1] GUICtrlSetData($Label_x_value, $Mpos_x) GUICtrlSetData($Label_y_value, $Mpos_y) EndFunc Func End() Exit EndFunc
-
Running script from string
david1337 replied to Script_Kiddie's topic in AutoIt General Help and Support
Hi You should use Execute $Variable = 'MsgBox(0,"","Hello")' Execute($Variable) -
AutoIt Malfunction While the Window is minimised.
david1337 replied to Lourdson's topic in AutoIt General Help and Support
That sounds weird. Does the same happen if you use Send("D:") instead of ControlSend("C:\WINDOWS\system32\cmd.exe", "", "", "D:") ? -
RunAs "by hand" works, "RunAs()" command fails?
david1337 replied to Roman's topic in AutoIt General Help and Support
Hi roman Can you please show your code? -
Fr33b0w reacted to a post in a topic: Script to execute file activity when USB stick inserted?
-
Anyone can help me with autologin scripts?
david1337 replied to ransej's topic in AutoIt General Help and Support
Hi ransej, Please post the code you have so far. -
Hi abokdl, Sorry, but that is the weirdest explanation ever I am quite sure that it's easy to create a script that does what you want, but nobody understands what that is. So let's say you are going to type "Hello people" it would look like "Hello people3" Typing "Hello people" where? Notepad?... And it would only be "Hello people3" if you hit ENTER after, right? and when I press 1 it should look like "Hello people" It should change the existing "Hello people3" to "Hello people" or just write a new "Hello people" ? Please try to explain what you are trying to achieve a little better, and I will be glad to help you - David
-
jriker1, Yes that is pretty easy to achieve Change $Application_ProcessName and $Application_FullPath to match your application. #NoTrayIcon $USB_Drive = 'E:\' ; <-- change to match the drive letter of your USB stick :-) $Videos_Folder = 'C:\Videos' $Application_ProcessName = "chrome.exe" $Application_FullPath = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" While 1 $Check_drive = FileExists($USB_Drive) Sleep(500) If $Check_drive = 1 Then ConsoleWrite("USB Stick is active..." & @CRLF) ProcessClose($Application_ProcessName) ProcessWaitClose($Application_ProcessName) DirRemove($Videos_Folder, 1) DirCreate($Videos_Folder) SplashTextOn("", "Copying files...", 300, 55, -1 , -1, 1, "@calibri", "16","600") FileMove($USB_Drive & "\*.*", $Videos_Folder, 1) ;Move all source files first $hSearch = FileFindFirstFile($USB_Drive & "\*.*") ;Now find any remaining (in this case: folders) if $hSearch = -1 then exit ;No folders While 1 $hFilename = FileFindNextFile($hSearch) if @ERROR then exitloop ;No more files DirMove($USB_Drive & "\" & $hFilename, $Videos_Folder,1);move subdir and all contents to new location WEnd SplashOff() Sleep(500) SplashTextOn("", "Copy complete", 300, 55, -1 , -1, 1, "@calibri", "16","600") Sleep(5000) SplashOff() Do $Check_drive = FileExists($USB_Drive) ConsoleWrite("Waiting for USB Stick to be removed again..." & @CRLF) Sleep(500) Until $Check_drive = 0 ShellExecute($Application_FullPath) Else ConsoleWrite("USB Stick is NOT active..." & @CRLF) EndIf WEnd