Jump to content

david1337

Active Members
  • Posts

    239
  • Joined

  • Last visited

Recent Profile Visitors

466 profile views

david1337's Achievements

  1. 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?
  2. Hi max23ed, Try with Shellexecute. ShellExecute("ussf.exe", $abc)
  3. I just tested with the Chrome windows running in full-screen. Still working!
  4. 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? 😏
  5. 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
  6. 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
  7. 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
  8. 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
  9. Hi You should use Execute $Variable = 'MsgBox(0,"","Hello")' Execute($Variable)
  10. That sounds weird. Does the same happen if you use Send("D:") instead of ControlSend("C:\WINDOWS\system32\cmd.exe", "", "", "D:") ?
  11. Hi roman Can you please show your code?
  12. Hi ransej, Please post the code you have so far.
  13. 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
  14. 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
×
×
  • Create New...