-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
By Sachs
I have a few questions:
BACKGROUND
I am using Oracle Application Testing Suite's OpenScript 13 (Eclipse IDE), Oracle Java 6, and AutoIt.
My goal is to access a given Internet Explorer browser window (`$ieTitle`), send the keystroke of "shift-control-s" for "Save As" functionality to be invoked, so that I can download a (PDF) file to a given location ($fileName).
The code within the script `DownloadPdfFile.au3` is
$ieTitle = $CmdLine[1] $ieControl = "AVL_AVView31" $fileName = $CmdLine[2] ControlFocus($ieTitle, "", $ieControl) ControlSend($ieTitle, "", $ieControl, "+^s") ; Save as dialog $winTitle = "Save As" ; wait for Save As window WinWait($winTitle) ; activate Save As window If Not WinActive($winTitle) Then WinActivate($winTitle) ControlFocus($winTitle,"","Edit1") ControlSetText($winTitle,"","Edit1",$fileName) Sleep(2000) ControlClick($winTitle,"","Button3") Exit 0 So I compiled it with SciTE-Lite (32-bit Version 4.4.6 , creating `DownloadPdfFile.exe`, and so within my Java code, I have
String command = autoItExePath + " " + scriptPath + " \"" + winTitle + "\" " + directoryPath.toFile().toString() + "\\Form9Report" + sdf_ddmmmyyyy.format(new Date()) + ".pdf"; try { Process process = Runtime.getRuntime().exec(command); process.waitFor(); } catch (Exception e) { logger.error("Exception " + e.getMessage(), e); } The output would be like `C:\Program Files (x86)\AutoIt3\AutoIt3.exe C:\...\AutoItScripts\DownloadPdfFile.au3 "https://****.com/****.exe?temp_id=**** - Internet Explorer" C:\...\Report05Apr2022.pdf"` which does run without the $cmdLine successfully.
When executed by Java, I see in the taskbar an icon, which I right-click has "[Check] Script Paused" and "Exit".
Questions:
(1) How do I unpause the script?
(2) How do I avoid having the script paused?
Any help is appreciated.
-
By Professor_Bernd
PSPad4AutoIt3 v2.0.0 beta (2021-04-16)
All parts are freeware.
PSPad4AutoIt3 consists of the Editor PSPad and the Improvement Kit, and can be used as an portable editor IDE for AutoIt3.
The author of the PSPad Editor is Jan Fiala.
I (Professor Bernd) am only the author of the Improvement Kit.
Contact us:
This is the first fully portable version of PSPad4AutoIt3.
There are a lot of changes and new features, e.g.
- a separate AutoIt3 menu in the PSPad main menu,
- the shortcuts are SciTE-like,
- Tidy for Au3,
- in CallTipViewer a recognition for writing "(",
- a dialog for registering file extensions with Pau3,
- a nice about dialog in "90s style",
- the CodeExplorer can now be displayed together with the FavTools on the right side,
( so the panel on the left side can be completely hidden )
- and much more ...
See here for details
All in all a lot has been done and it is worth to have a look Praise, criticism, ideas, tips and hints on bugs are welcome. Have fun with the new features!
Thank you very much,
Professor Bernd.
Special thanks for the friendly support goes to:
Jan Fiala (Author of PSPad)
Jos van der Zande (Author of AutoIt3Wrapper, Tidy, ...)
alpines (suggestions, ideas, testing, design for syntax colors, develop routines)
argumentum (feedback, suggestions, ideas)
AspirinJunkie (RegExp pattern, ideas and code snippets)
Bitnugger (suggestions, ideas and code snippets)
BugFix (suggestions, ideas and code snippets)
Gun-Food (for making it possible to publish the project here)
LarsJ (VBScript<->AutoIt communication, …)
Musashi (suggestions and ideas)
Credits for many other contributors can be found in the Pau3 About dialog.
PSPad4AutoIt3 v2.1.0 beta - Update (2021-05-02)
See here for details v2.1.0 beta - Update
Download in the german forum PSPad4AutoIt3 (Editor IDE), end of post #1 -
By asiawatcher
hi below i got one script i made which runs audacity starts a recording and ends it at specific times
when i run the script even if it isn't the time to start audacity and sits idle on taskbar the pc fan gets very loud, when i close the script it comes back to normal
why this happens ? anything wrong with my code ?? cheers
#include <INet.au3> #include <Array.au3> #include <WinAPIFiles.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <string.au3> #include <FTPEx.au3> #include <ClipBoard.au3> #include <date.au3> #include <ProgressConstants.au3> #include <IE.au3> #Include <Constants.au3> #Include <INET.au3> #include <SendMessage.au3> #include <File.au3> #include <String.au3> #include <MsgBoxConstants.au3> #include <StringConstants.au3> #include <Misc.au3> #include <FileConstants.au3> #include <WinAPI.au3> while 1 if @HOUR = '11' And @MIN = '00' Then Run("C:\Program Files (x86)\Audacity\audacity.exe", "", @SW_MAXIMIZE) SLEEP(2000) if ProcessExists("audacity.exe") Then winactivate("Audacity") EndIf Send("r") ;;KREVATI Sleep(1000 * 60) endif if @HOUR = '23' And @MIN = '00' Then if ProcessExists("audacity.exe") Then winactivate("Audacity") EndIf Send("s") Sleep(1000 * 60) EndIf wend
-
By nacerbaaziz
hello autoit team
please i need your help today
am trying to make the list of features in list view and control it
am using the dism command line to read output
i've made the code
but i found some problems
what i need is the list of features in 2d array
$array[$n][0]= name $array[$i][1] = state
when i tested the code
it give me some results that i don't need to it e.g
------ ------ | --------
or
name | state
i need just the list of features and there state
please help me to do that
here is my example
#RequireAdmin #NoTrayIcon #include <AutoItConstants.au3> Wow64EnableWow64FsRedirection(false) _Windows_Get_Features() func _Windows_Get_Features() local $a_FeaturesArray[1][2] $a_FeaturesArray[0][0] local $i_Dism_Run = Run("DISM /online /english /get-features /format:table", "", @sw_hide, BitOR($STDERR_CHILD, $STDOUT_CHILD)) local $s_OutputDism = "", $a_OutPutDism While 1 $s_OutputDism = StdoutRead($i_Dism_Run) If @error Then exitLoop if ($s_OutputDism = "") or (StringRegExp($s_OutputDism, "^((\-){1,})?(?:\s)\|?(?:\s)((\-){1,})$", 0) = 1) then ContinueLoop if (StringRegExp($s_OutputDism, "((([\s\d\-\+\_\,]{1})\|([\s\d\-\+\_\,]{1})){1,})", 0) = 1) then $a_OutPutDism = StringSplit($s_OutputDism, @lf) for $i = 1 to $a_OutPutDism[0] if msgBox(1, $i, $a_OutPutDism[$i]) = 1 then exitLoop next endIf Wend endFunc func Wow64EnableWow64FsRedirection($b_Enabled) local $h_OpenFS = DLLOpen("kernel32.dll") local $Return = DllCall($h_OpenFS, "boolean", "Wow64EnableWow64FsRedirection", "boolean", $b_Enabled) if @error then DLLClose($h_OpenFS) Return SetError(@error, @extended, -1) else DLLClose($h_OpenFS) Return $Return[0] endIf endFunc
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now