
RedAck
Members-
Posts
19 -
Joined
-
Last visited
Everything posted by RedAck
-
Hi Everyone! I am developing a script that close the application when system is locked. I was testing the script and when i used Send (<Keystroke>) works fine whereas Controlsend (title, "", "" , <Keystroke>) is not working. Request your suggestion. Thanks
-
how to find file location - (Moved)
RedAck replied to RedAck's topic in AutoIt General Help and Support
I'm really very thank full and sorry to you. I have modified the code as per our requirement but, we are facing issues. could you please help us on that. As you can see this the location is populated using $output &= "CommandLine: " & $objItem.CommandLine & @CRLF & @CRLF Along with application path and file name. I tried to trim that value so that i can get only "C:\Users\Peter\Desktop\" using following command $output = $objItem.CommandLine $convert = _ArrayToString($output) $filepath = _StringBetween($output, " ", "$filename")[1] Getting following error "C:\Program Files (x86)\AutoIt3\Include\String.au3" (37) : ==> Subscript used on non-accessible variable.: Func _StringBetween($sString, $sStart, $sEnd, $iMode = $STR_ENDISSTART, $bCase = False) Func _StringBetween($sString, $sStart, $sEnd,^ ERROR -
how to find file location - (Moved)
RedAck replied to RedAck's topic in AutoIt General Help and Support
I'm really very sorry for not trying the code. I just read the topic and replied. -
how to find file location - (Moved)
RedAck replied to RedAck's topic in AutoIt General Help and Support
Thank you for your suggestion. But i'm not looking for location of a process. I would like to find the location of files used by the process i.e., location of txt file used by Notepad++ -
HI Eveyone! Request your help on how to find the file location of other application using autoit script. Let me explain the scenario for better understanding. I open a txt file using notepad++ from C:\User\RedAck\Desktop\test.txt I want to write a script in such a way that it reads the file path (C:\User\RedAck\Desktop\) from Notepad++ or de we have a inbuilt function?
-
Saveas file in their respective locations - (Moved)
RedAck replied to RedAck's topic in AutoIt General Help and Support
Please find the script below for saving part, (attached from other forum) If $count > 10 Then WinActivate(notepad) WinWaitActive(notepad) Send("!s") Sleep(5000) Send("Auto file save "&@HOUR&"_"&@MIN&"_"&@SEC) Sleep(5000) Send("{Enter}") ProcessClose("Notepad.exe") EndIf Please let me know if you need more details. I hope i need to make changes in highlighted (Bold) text. -
Saveas file in their respective locations - (Moved)
RedAck replied to RedAck's topic in AutoIt General Help and Support
Actually i dont want to create a direct copy of files in same location. let me explain you the scenario.. I have 2 text file open with file1.txt, file2.txt name (different location as mentioned before). I'm automatically closing if there is no interaction with notepad. Before closing, i would like to create a copy of both files (unsaved/modified) in their respective folders. -
Hello Everyone! Would request your help on how to saveas a file in its previous location. Lets say file 1 path : C:\Windows\User1\file1.txt file 2 path : C:\Users\User2\file2.txt I have written a script that will saveas both file and save in the same location (lets say desktop). How can i modify the script so that the files will be saved as file 1 : C:\Windows\User1\file1_copy.txt file 2 : C:\Users\User2\file2_copy.txt. Thanks in advance
-
How to Autosave a file in a temp path
RedAck replied to RedAck's topic in AutoIt General Help and Support
Not the same application. The above script works for Notepad. What if i want to monitor word and excel in the same script. or more alication -
How to Autosave a file in a temp path
RedAck replied to RedAck's topic in AutoIt General Help and Support
I have asked the following question in other discussions aswell. Please let me know if you can help! The above script particularly works fine for single application. What if i want to monitor idle time for morethan 2 application. How to modify the above script. -
I'm not that good at autoit and just started to explore autoit. This topic was interesting and wanted to explore more on this. lets say if i want to monitor notepad, word and excel... how to write the script? what if all three application are minimised? in which order the script works?
-
is it possible to monitor more than 1 application?
-
is it possible to monitor idle time for more than 1 application?
-
TCPStatup and TCPShutdown - (Moved)
RedAck replied to RedAck's topic in AutoIt General Help and Support
Lets say i have chrome and i'm using it. If i want to restrict internet access only to chrome when it is minimized, is it possible to using TCP(UDP)Startup and Shutdown. If not do we have any other function to do that. -
TCPStatup and TCPShutdown - (Moved)
RedAck replied to RedAck's topic in AutoIt General Help and Support
Hi Guys, I'm new to autoit, I was wondering whether Is it possible to restrict tcp and udp connection to a particular application using TCP(UDP)Startup and Shutdown. Thanks in advance. Regards, RedAck -
Hi Guys, I'm new to autoit, I was wondering whether Is it possible to restrict tcp and udp connection to a particular application using TCP(UDP)Startup and Shutdown. Thanks in advance. Regards, RedAck
-
How to Autosave a file in a temp path
RedAck replied to RedAck's topic in AutoIt General Help and Support
The following below code is working fine. Any suggestions on shorting this code and this file is getting saved in its default location. Could you please suggest on how to change the path in "save as" dialogue. --------------------------------------------------------------------------------------------------------------------------------- If $count > 3 Then WinActivate($title) WinWaitActive($title) Send("!F") Send("A") WinWaitActive("[TITLE:Save As]") Send("temp file save") Sleep(2000) Send("!S") Sleep(3000) ProcessClose("Notepad.exe") $count = 0 EndIf -------------------------------------------------------------------------------------------------------------------------------------------- -
How to Autosave a file in a temp path
RedAck replied to RedAck's topic in AutoIt General Help and Support
The previous script i posted will update the file once it get closed. I'm trying to save the file in different location with different name. I was trying the following code. ---------------------------------------------------------------------------------------------------- If $count > 3 Then WinActivate($title) Send("!F") Send("!A") WinWaitActive("Save As","File name") Send("temp file save") Send("!s") ----------------------------------------------------------------------------------------- this changes the application window to notepad but it is not showing the saveas window. -
Hi Everyone, I am developing a script to autoclose a program if the application is idle for say 10 sec. I also want to save the file before closing the application in a different path and name from parent. Please find the below sample code. --------------------------------------------------------------------------------------------------------------------------------- Opt("WinTitleMatchMode", 2) ;2 = any substring Opt("TrayIconDebug", 1) $S_running = "check-4-app" ;name the script If WinExists($S_running) Then Exit AutoItWinSetTitle($S_running) $title = "- Notepad" $count = 0 While 1 $state = WinGetState($title) $count += 1 If $state = 15 Or $state = 47 Or $state = 0 Then $count = 0 If $count > 10 Then WinClose($title) Send("!s") $count = 0 EndIf ToolTip("count = " & $count, 0, 0, "state = " & $state) Sleep(1000) WEnd -------------------------------------------------------------------------------------------- Thanks in advance.