I am very much glad if anyone help me. am fairly new to Unix scripting side. I am trying to get into one url, but before that am getting one popup window(asking for customer details). So, i need to block/disable/ auto close the popup window. Please help me with the command
In Unix environment shell command plays differently. It can launch your browser but it can not set utility inside a browser application. You need to fix it inside your browser window by using tool option. Just search in google like how to block popup in yourbrowserName.
Related
I have a simple AppleScript which tells me url of active window in specific browser
tell application "Opera"
get URL of active tab of window 1
end tell
However I would like to see Apple Events needed to run that script, probable some of these: https://developer.apple.com/documentation/coreservices/apple_events?language=objc
My final goal is to code same script but using Apple Core Services.
I have checked Script Editor but I do not see any tab or menu where that information is displayed. Is there any way to translate that script?
Thanks in advance and regards
Yes, there are several such ways. My favorite is to use Script Debugger, which just translates the AppleScript into raw Apple events for you. Alternatively, you can run your AppleScript in an environment where export AEDebugSends=1; export AEDebugReceives=1 has been turned on.
How do I open a link in the same browser tab? I tried this code:
ShellExecute(Handle, 'open', 'http://site.com', '_self', nil, SW_SHOWNORMAL);
But it continues to open the link in a new table.
Thanks.
I've written on this topic before:
ShellExecute has absolutely no notion of "tab." In fact, it doesn't
even have a notion of "default browser." All it does is find whatever
program is configured for file names that start with "http://" and
execute the configured command line.
What the browser does with the new command line is its own choice.
The API function has no control. Sometimes, the browser allows the
user to configure it.
Opening a new tab or window is the safest thing to do. Neither you
nor the browser knows whether the user is still using the previous
tab or window.
A possible entry point is using OLE Automation. Using this technique you can connect with any existing instance of MSIE, so that you can bring the current browsing window to a new url.
I have situation like below.
I'm running some command and then I get a popup with Y/N answer. Is there a possibility to force answer Yes and automatically close the window through command line?
If you want to click a button in an external window, you'll need to hook the window with the button exposed. You can accomplish this by grabbing the window handle via FindWindow, finding the child button, and sending a BM_CLICK with an API call via SendMessage.
you mean a command window within VS ? I don't think there's anything generic, you could run all sorts of things, depends on what your command is - and how much control over it you have - maybe some example of what you're trying to do could help. 'picking' the window will work but depends again on what you're doing, how custom it is etc.
I use firebug a lot. However I do not like typing console.log all the time. I would rather type just log. So at the top of my console window I add this line all the time.
function log(){try{console.log.apply(console,arguments);}catch(e){}}
log(2 + 2);
I don't like to type that log statement every single time.
Is there a way I can tell either firefox or firebug to include that log function all the time.I guess I want to tinker with firebug and ask it to add that one function anytime it comes up live.
Any thoughts.
OK, this is probably a more complicated answer than you were after, but this is what I would do. I would build for myself a tiny Firefox extension which used an overlay to add a script into the windows which you are interested in, in this case the console window. The script would define anything you wanted in the context of this window, including your log() function. When Firefox opens the console window, it will run your script in this context, making the function available to you.
However, if you're not comfortable or experienced with creating Firefox extensions, this is unlikely to help in your particular case.
Have you tried to create a Greasemonkey script?
How would you automate logging into a website and downloading a page using vbscript?
Using the MSXML.XMLHTTP-object to first do a POST to login and then add the cookie-headers to a GET request.
As a quick and dirty solution, you could use a Shell object with SendKeys and Run as demonstrated here. These functions are quite powerful for those situations where you just can't the right object or library to use...
Well the script (given on link )works fine if you open the notepad and don't change the focus to other window.
If you change the focus above script doesn't work.