I am trying to give focus to a safari browser modal box and control its input and dismissal.
Example: Navigate to a website, it throws a modal box, is it possible to create an automator workflow or script that will be able to give the modal focus and interact with its content?
TIA,
BK
Try using System Events:
tell application "System Events" to tell process "Safari"
click button "OK" of window 1
end tell
tell application "System Events" to tell process "Safari"
set value of text field 1 of window 1 to "aa"
click button "OK" of window 1
end tell
Related
I created a pop-up page. That pop-up window has a radio button, a text box, and an execute button. I want to work that page working like... when pressing the button, run a update SQL with the values of the radio button and text box, and close itself.
I tried that answer in the following link. But the pop-up page just reloaded and the page stayed open. How to close popup window in Oracle-apex?
If possible, I would like to validate the value of the text box. If it was an incorrect value then break the process with a message. If path that validation, run a update SQL and close the pop-up window.
Thank you for your kindness for read this confusing question.
You should be using a "Close Dialog" process type after your Save Process.
Make sure that you also set the server side condition accordingly so that the dialog only closes after your save process.
I GOT RESOLVED IT!
Not use any close method, redirect util is fine work like this APEX_UTIL.REDIRECT_URL (APEX_PAGE.GET_URL(p_page => 7));
Thank you to all ppl for look this page :)
Hello dear Stackoverflow community,
I am looking in vain for an applescript with which I can delete the history, the website data, the cookies and the cache in my Safari browser 13.1.1. Unfortunately I only find scripts for older browser versions.
So far I've been experimenting with the following script only for the website data, but it may not work:
tell application "System Events" to tell process "Safari"
keystroke "," using command down
delay 1
click button "Privacy" of toolbar 1 of window 1
click button "Manage Website Data…" of group 1 of group 1 of window "Privacy"
delay 3
click button "Remove All"
click button "Done"
end tell
Since I am using the German Safari version, I have replaced the following terms:
"Privacy" → "Datenschutz"
"Manage Website Data…" → "Websitedaten verwalten ..."
"Remove All" → "Alle entfernen"
"Done" → "Fertig"
So my script looks like this:
tell application "System Events" to tell process "Safari"
keystroke "," using command down
delay 1
click button "Datenschutz" of toolbar 1 of window 1
click button "Websitedaten verwalten …" of group 1 of group 1 of window "Datenschutz"
delay 3
click button "Alle entfernen"
click button "Fertig"
end tell
Unfortunately it does not work even then and I assume that this script does not fit for Safari 13.1.1.
Can someone help me here?
However, I have to confess that I am not very well versed in programming.
Kind regards and thank you ever
Andy
I have an apex page where I have a button "SAVE & CLOSE" . On click of that button, I first want to save the data and then close the page.
I have a PLSQL code at point "Processing" to save the data.
I have then created a Branch at Point = "After Processing" and Type ="PLSQL Procedure" and written below code to close the window.
Begin
htp.p('<script type="text/javascript" >');
htp.p('window.close();');
htp.p('</script>');
end;
I have added the button's name in server side condition : When button Pressed.
But this doesn't work. When I click on apply, it doesn't close the window. It gives me an error :
"Error: SyntaxError: Unexpected token < in JSON at position 0 "
Can you please help me resolve this error and tell how can I close the window in button click.
Thanks,
Abha
You can use only APEX components and not write a single line of code :)
Set action for your button to "Submit page" - so all items will be submitted to use their values in processing. Image below will help you.
Now, for processing your pl/sql code use process in processing(left side on the picture).
Here you can create a new process and set type to "Close dialog" this process will automatically close the window. Without any javascript etc.. Apex is processing from top to bottom, so if you make this process last, it will always close the window after all processes are done.
You can as well set process server side condition, so it will not trigger every time.
Be careful with javascript - some web browsers are processing them in different way.
Hope it will help. Have a nice day !
Hi I got it working with other method :
Instead of type : PLSQL Procedure" select Type = "Page or URL Redirect"
and give
javascript:window.close()
in the Target.
This works.
What I did was make the page Modal. Then I added a Button called btnClosePage with a Dynamic Action (True Event) that calls "Close Dialog". I am working in Oracle Apex 20.2.
I have an application, which has a search button and a spreadsheet where the searched item is placed. Now the search button causes a "Search" dialog box to pop up which is modeless, hence meaning that one can still work on the spreadsheet. If one right clicks on the item already placed on the spreadsheet, with the "Search" dialog still open by the side, another dialog "B" pops up which is modal and causes the application to freeze until we kill the dialog "B" somehow. But the "Search" dialog is however operable and is not desired.
Can anyone please suggest any way using which i can make the "Search" dialog also inactive as the rest of the application when dialog "B" launches?
I have a win32 application in that on EditMolecule Dialog there are three tab controls.First tab control opens atom dialog. On atom dialog, there is a custom combobox control, while user clicks on the dropdownlist of this control and waits for more than 5 seconds(in Windows7),the EditMolecule window becomes nonresponsive. The same application works well in windows xp.
Can anyone please suggest the solution to this problem.
Thanks in advance.
When opening a dialog in pure WIN32, your main message loop is not running. You have to add a new message loop for the dialog.