Hey I have a scheduled task going which basically laucnhes a .aspx page with IE Explorer, i know theres better ways of doing this i.e console apps etc but im stuck with this for the moment.
So the scheduled task runs fine and launches the ie and the page and the script on the onload on that page runs fine to. But the IE window stays open and the tasks remains as "Running". Preventing it from running the next time its due to run.
How can I get the scheduled tasks to stop "running" and maybe even close that IE windows cheers!
If you're looking to just make a HTTP request to the page, instead of opening a browser window, (get Firefox, okay?), you could launch curl http://server/path/to/script.aspx which is a command-line app, which makes the request and then quits immediately after.
For this, you'll need to download curl from http://curl.haxx.se/latest.cgi?curl=win32-ssl
Related
I have an application whose installer is built with Install4J and when I run the Windows installer exe file the GUI doesn't appear until after about 15 seconds. During this time, there's an empty console visible to the user, and they may get the impression that nothing is happening.
What I'd like to do is simply print a message to the user, so they know the installer is running prior to the GUI appearing (or some other solution with a similar effect).
I added an action to the "Startup" section of the Install4j config that prints a message to the console. As far as I can tell, this is the earliest I can configure Install4J to do an action. It works great except that it doesn't print until after the GUI has already loaded, which defeats the purpose. It's currently the only action in the "Startup" section - moving our other startup actions to happen later didn't have any effect on how soon the message is displayed.
In the i4j_nlog_1 log file, it says what was happening during those 15 seconds before the GUI appears. ~5.5 seconds are verifying integrity, and ~7.2 seconds are extracting/creating. Ideally, I'd be able to print a hello message prior to any of that.
By default, installj4 immediately shows a native progress dialog when the installer is executed.
It is possible to deactivate that progress dialog by deselecting the "Suppress initial progress dialog" property on the "Installer" node in the "Installer->Screens & Actions" step.
I'm testing a custom WPF application using pywinauto.
When connecting with win32, I don't get any dependents, so I'm connecting with uia.
After I launch the application, I can immediately connect with pywinauto, but it takes 30s+ before I'm able to access any elements. After the initial delay, interacting and searching for controls is quick.
I call windows() as a way to wait until the application lets me interact with it.
main_app = Application(backend="uia").connect(path=APP_PATH)
main_app.windows()
On investigation, the hanging seems to occur during: "application.py" > "windows" > "findwindows.find_elements(...)" > "element.children(...).
If I open the application, and wait for 1 minute, and then run the script, then it occurs almost immediately. And finding subsequent controls is quick.
I appear to see this same behaviour when using inspect.exe to view the hierarchy. If I refresh immediately after opening the application, it takes 30s+ to show anything. But If I wait a minute before refreshing, it updates immediately.
I was wondering if someone else had experienced this before, and what might be the cause/solution.
I am running:
Windows 10, python 3.8.3, pywinauto 0.6.8
Sometimes setting an application as an firewall exceptions helps them boot/open faster.
Granting Firewall exception on Windows 10 for an application:
Go to Control Panel.
Click Windows Firewall or Windows Defender Firewall option.
Choose option "Allow an app or feature through Windows Firewall" (on left side).
Select your application in the list or click on Add Another App to find it and add it to list.
After debugging some more, I have resolved the issue, although it's not clear to me what the root cause actually was.
The custom application I'm testing launches a background application as a non-visible console. Testing showed that not running this background application allowed me to conenct immediately. Running the background application by itself would cause the same delay in inspect.exe loading.
The application was a dotnet framework application, that in theory was a console only application, but had code supporting a WPF interface (which was not displayed). By removing the WPF aspects of the project, I was able to build the application as a purely console application, and I no longer experienced the earlier delays.
I've recently started creating some simple scripts with autoHotKey, and I'd like to know if it is possible to close Spotify, which changes window title for every song.
I've tried with
Process, Close, Spotify
but it doesn't work unfortunately.
The following code snippet works for me:
while(Winexist("ahk_exe Spotify.exe"))
WinClose
Spotify is weird in that it appears to create many processes of itself when launched,
and that when you run a command like WinClose, ahk_exe Spotify.exe once, it does not immediately close the program (you can still use and interact with the GUI, but if you attempt to move the window by dragging the top bar, Spotify crashes).
However, if you spam that command over and over again, Spotify eventually closes as intended. So, in order to deal with this, let's create a program such that while there still remain Spotify processes, close Spotify Processes. Then, once there are no Spotify processes remaining, stop trying to close Spotify.
My goal is to close one specific tab (google chrome) after i have opened more than 1 tab using command prompt on windows 10. So everything should happen automatically since nobody should reach the pc/monitor etc.. I cant just simply use the start "URL" command since its a page which requires a login on the previous page. I have problems explaining why exactly i have to do it this way. I imagine i can use the taskkill command to close a tab. but that requires the Process-ID. The problem for me is that the PID always changes after the tab has been freshly opened. The PC shuts down at 17:00, starts at 08:00 and via autostart 2 tabs are being opened (actually 3 but the first one doesnt matter regarding this problem). The first tab is being opened and then the second one after a delay of 10 seconds (because it wont load until the first page is logged in automatically which takes at least 7 seconds). Now that the second page is open i want to close the first one but i struggle with that. Im doing all of this automatically via command prompt. What also doesnt work is closing chrome with taskkill and reopening the second tab (because of the log-in). I'm definitely no expert (more like a noob) but i would appreciate it if somebody could help me:D.
In Chrome DevTools, I want to be able to hit F8 (pause script execution), and then interact with the page's elements to see what script it fires. The goal is to pause script execution as soon as I click on a button, for example.
However, when hitting F8, I'm brought to a certain script file in the Sources tab. It seems to be constantly running, perhaps on a timer. I hit Shift+F11 to step out of the function, but this brings me to the "unpuased" state again in Chrome.
In this case, the script running in the background is Plupload jQuery plugin.
Can I deactive or ignore those scripts running constantly in the backgound, in order to be able to debug page interaction events?
You can use the DOM, XHR, and Event Listener breakpoints menus on the Sources tab to target the operations you would like to investigate. This approach will probably take some experimentation and practice, but it may give you the control you seek.