Running 2 scripts using the browser simultaneously

I was wondering,
Is there a way to run two different AppleScripts using Safari at the same time, so that e.g. one would operate in one tab and the other in a different tab? How do I go about that? How do I avoid conflicts? (I should add that my knowledge of applescripting is rather limmited, so more information is better than less )
Also, both scripts would be using the curl command and shell script to download or save files, etc. What would happen, if both scripts tired to call the curl command at the same time? Would that cause a conflict, or would the scripts just be put in a queue?
Any ideas?

but how do I know which document is which? Is there any way  to tell safari to set the index of a document?
There are numerous ways of identifying/tracking objects within AppleScript - and that's generally true for any object in any app.
In this case 'index' is really front-to-back order, so 'document 1' (or 'window 1') is the frontmost, and therefore the inverse of how you created the documents in the first place. Of course that gets messy as you open new windows, move them around, etc.
You can change the index of the windows, though, which changes their relative order:
tell application "Safari"
          set index of window 2 to 1
end tell
There are other ways, though. For example, each window has an associated ID, which is persistent, therefore you could store the ID of each newly-created window and use that as your target:
tell application "Safari"
          make new document with properties {URL:"http://www.apple.com/"}
          set appleID to id of window 1 -- store the window ID
  -- later on you can reference that same ID:
  delay 5
          set s to source of document of window id appleID
end tell
Other options include the name of the document, as well as relative options. Each application and object class has its own terms, so you'll need to explore the dictionary to determine what's appropriate for any given task.

Similar Messages

  • How to run 3d swing on the browser? how to use pugin  HTML conventer??

    hi dear all,
    I have problem now. I want to run my program in the browser. i use java 3d swing in my code as well. I look from books.It is saying that is possiable to do it , but , you have to use the java pugin conventer . I have tried , and it is not work on my computer , i have been doing just this for a week . If someone can give me some help , i will really really greatful about it .
    Thank you in advance .
    regards
    jojo

    What kind of command - HTML is a markup language not an execution language. If you mean how can you display an HTML document then use WEB.SHOW_DOCUMENT()

  • How to run expect script using SGD?

    Does any one know how I can run an expect script using the same executable SGD uses? I think the executable is /opt/tarantella/bin/bin/ttatcl, but it seems to be looking for an init file that I cannot find.
    Anyone tried this before?
    Thanks

    ttatcl is a TCL interpreter, the expect functionality is embedded into ttaexecpe and can't be used externally.
    Linux distributions usually include expect and you can find expect for Solaris here :
    http://www.sun.com/software/solaris/freeware/index.xml

  • Since installation of 8.1.2 I get an error message each time I use the browser--"a problem occurred with this webpage so it was reloaded". I have iPad 2.

    I Have an iPad 2. Since download of iOS 8.1.2 every time I use the browser--usually Google --this message comes up "a problem occurred with this webpage so it was reloaded". Touchpad also seems slow and jerky.

    Its not necessarily freezing - just being slow to build.
    May have something to do with this being a secured site - I an giving Opera a test run & this part of the apple site does not go into compressed load - but the non-secure parts of the site do.  The issue may be that some sites like apples just have too much unimportant junk on the screen because the designers are on an internal network a few offices away from the server and never see all the issues that com up.

  • Firefox is using large amounts of CPU time and disk access, and I need to know how to shut down most of this so I can actually use the browser.

    Firefox is a very busy piece of software. It's using large amounts of CPU time and disk access. It puts my usage at low priority, so I have to wait for some time to be able to use my pointer or keyboard. I don't know what it uses all that CPU and disk access time for, but it's of no use to me. It often takes off with massive use of resources when I'm not doing anything, and I may not have use of my pointer for several minutes. How can I shut down most of this so I can use the browser to get my work done. I just want to use the web site access part of the software, and drop all the extra. I don't want Firefox to be able to recover after a crash. I just want to browse with a minimum of interference from Firefox. I would think that this is the most commonly asked question.

    Firefox consumes a lot of CPU resources
    * https://support.mozilla.com/en-US/kb/Firefox%20consumes%20a%20lot%20of%20CPU%20resources
    High memory usage
    * https://support.mozilla.com/en-US/kb/High%20memory%20usage
    Check and tell if its working.

  • When I am using the browser for a while and try to use ANY search bar and hit the "search" button it does a whopping NOTHING is there anyway of keeping this from happening?

    Whenever I am using Firefox mobile - either regular, beta or aurora and go to search for something like through the Google search page and attempt to search for something the search bar does nothing and hitting the enter button instead doesn't do anything either. Is there a way to keep this from happening?

    Hi and thanks to not leaving the firefox user alone.
    Cor-el your answer is right as the madperson is and I already knew all these
    answer and I said that before I don’t use any antivirus and I always turn off my firewall from the moment I installed my Windows.
    I even turn off any automatic update for any of my software and I never let any unknown plugins or any thing like that be install without informing me. And if you know some things like Offline Storage and cookies must be to much more than usual and you have to clear them and delete them and I know so much more
    And if you want to know it fixed now. But I don’t know how?
    For understanding my problem read and research about Ixplorer.exe virus it is the same problem about the speed but the different is it doesn’t show any process in task manager like Ixplorer.exe virus
    Bt I have done some things but still I don’t know that’s why it is fixed or not
    First: I searched my system and removed any files have been crated on my system from two days ago since the problem happened.
    And then I used to go about the article in this page and did like this:
    http://answers.yahoo.com/question/index?qid=20080910101846AAazxN5
    but still I don’t know any thing about the problem.
    I can do so many things to fix but I am just curios if that is a virus why it just cut the speed when I am using the browser.
    Please if any one found the reason send me your information I like to know it will improve my knowledge however my problem is solved fro now.

  • Running perl scripts off the preinstall script during a pkgadd

    Hello,
    I'm trying to build a custom package (apache2 + mysql + php + other stuff) and get stuck on some stone wall that I can't figure.
    Correct me if I'm wrong in my assumptions, and if able, could you provide a work around ? Here it is :
    - The preinstall script must be in /bin/sh , /bin/bash or any valid shell
    - Must be run by root, 'f course
    Now.. As I'm not that strong on bash/sh scripting, I tried to call a perl script off my preinstall script. Somehow my preinstall script just never call the .pl .
    This leads me to my third assumption :
    - It is impossible, not permissible to run other scripts from the preinstall script.
    Basically the perl script checks for some users in /etc/passwd + /etc/group, checks for some directories, create a custom SMF manifest, etc etc . I pretty much want the .pl script to be run.
    The script itself is well packaged, correctly inserted in the package's pkgmap, and so on.
    Any ideas ?
    Thanks,
    Jeff

    The script itself is well packaged, correctly inserted in the package's pkgmap, and so on.http://docs.sun.com/app/docs/doc/817-0406/ch3enhancepkg-10289?a=view

  • Can't use the Browser and other Apps on my Torch 9860

    Hi~
    I'm having problem with my BB 9860. It appears that my phone is connected to Wifi but when I tried to use the Browser and other apps, it's says "Unable to Connect on the Internet".
    Do you guys have any idea what could be the problem??
    I will appreciate any kind of help.
    Thanks in advance ^__^

    Hi jinyunstar 31516
    Welcome to the Community
    Please have a look at the Article of Help blog from Inside BlackBerry How to connect to a Wi-Fi network using a BlackBerry smartphone .
    Prince
    Click " Like " if you want to Thank someone.
    If Problem Resolves mark the post(s) as " Solution ", so that other can make use of it.
    Click " Like " if you want to Thank someone.
    If Problem Resolves mark the post(s) as " Solution ", so that other can make use of it.

  • Run a Script after the MA is published to SAP ERP.

    Hello, I'm trying to run a script after the MA is published, in order to automatically change it's status.
    I already have the script done and working, the only problem is that I need to know where to put it (or what type of script it should be) in order to run after the MA  has been published successfully.
    Thanks in advance !
    Oscar Obeso.

    That is also a good solution.
    But what I did to fix it was to make a Script to run on validation.
    Then, on that phase I checked the date of sent to external. If that date was null, it meant that Agreement had never been published.
    Otherwise, it meant i had been published, and so I checked for the status to change it if neccesary.
    Thanks for the answers, they are valid solutions too.
    Oscar Obeso.

  • I tried to use the Browse button on the left pane to go to a server which has my local copy so that I can FTP to ISP, but I get a window saying there is a permissions issue. How do I resolve?

    I tried to use the Browse button on the left pane to go to a server which has my local copy so that I can FTP to ISP, but I get a window saying there is a permissions issue. How do I resolve?

    If it has a cloud icon it means its no longer on your device.  Tapping on the cloud will effectively reinstall the App from scratch to your device. 
    There is no way to remove it from the cloud because its not yours to remove from there. Its the general App repository, you are just given access to it to download content you've already purchased.

  • Having problems trying to run a sql script using the command prompt.

    I place my script at the root c:
    open run SQL Command Line.
    I connected to the database using connet userid/password
    Then I tried to execute the script by doing
    @test_add_comments
    I am getting the error message.
    SQL> @test_add_comments
    SP2-0310: unable to open file "test_add_comments.sql"
    Am I suppose to place this sql somewhere else?
    test_add_comments.sql is
    COMMENT ON COLUMN myTable.ID IS 'Primary Key' ;
    COMMENT ON COLUMN myTable.REVIEWLOG_ID IS 'REFERENCE TO SAFE REVIEW LOG TABLE' ;
    COMMENT ON COLUMN myTable.FAC_ID IS 'REFERENCE TO ALL FACILITIES' ;
    COMMENT ON COLUMN myTable.HALLBUILD_ID IS 'REFERENCE TO HALL BUILDING' ;

    I figure it out.
    open a sql worksheet and enter the falling commands in the run script.
    @c:\your_script.sql
    Execute it by clicking run script.

  • Keep getting this message and can't use the browser, "Script: chrome://vidbar/content/downloader.js:117"

    what more do you need to know? i get this message "Script: chrome://vidbar/content/downloader.js:117" and the browser is useless until i restart.

    Hi,
    I was having the exact same problem while browsing some sites (Google news, Google image search, Youtube).
    It was caused by the "Screenshot Pimp" extension. I uninstalled it and all is OK now.
    It looks like this extension packs a lot of "generic" code that is not used by the extension but could be used by other extensions from the same publisher (Mediapimp).
    So if you have this extension try removing it (not just disabling it). If you don't, look for other extensions like viddownloader, Youtube downloader, Video downloader, Mediapimp, etc. and remove them one by one until your browser is back to normal.

  • Error when running a script using upsshell.exe

    I have a simple custom script which is
    Sub Test1()
    Set fso=  CreateObject("Scripting.filesystemobject")
    Set ts = fso.CreateTextFile("D:\DATA\****\Outbox\Templates\Test.txt")
    ts.writeline "hi"
    End sub
    When I am running it manually in workbench, the script runs fine but when I try to run it using upsshell.exe(command provided below)
    D:\Oracle\MIDDLE~1\EPMSYS~1\products\FINANC~2\SHARED~1\upsShell.exe CustomScriptEx=****~admin~****~~****~D:\DATA\test\Outbox\Logs~Test1~1033~0
    i get the following error
      ERROR:
        Code............ 438
        Description..... [Script failure caused error]: Object doesn't support this property or method
        Procedure....... modupsShell.ExecuteCustomScriptEx
        Component....... upsShell
        Version......... 1112
        Process ID...... 292496
        Thread.......... 290292
      IDENTIFICATION:
        User............ admin
        Domain..........
        Computer Name... *******
        App Name........ ****
      PROCEDURE STEPS:
        1-Split Arguments
        2-Create Load balancer=*******
        3-Authenticate
        4-Get Next App Server
        5-Open App Server=*******
        6-Execute the script=Test1
        7-Step was not reached, a previous step failed
    Any ideas on the error?

    Hello Verdulken,
    I have a few additional questions:
    Does your application function correctly when running the LabVIEW operator interface you have created as a VI in the LabVIEW development environment (i.e. does this problem only occur when the LabVIEW operator interface is run as an executable)?
    What is the error that you are receiving?
    Regarding the VI that you open programmatically, do you open it in a visible manner (i.e. use the Show front panel when called option from VI Properties)?If so, do you also close this VI after it finishes (i.e. use the Close if originally closed option from VI Properties)?
    Does the error occur on the step that calls this very same VI again later in the sequence?
    Does your application function correctly if you use the development adapter for all of your calls?
    Thank you in advance for this information,
    Matt G.
    National Instruments
    Applications Engineering

  • I am getting "error" messages in Yahoo using the browser on my laptop, but do not have similar issues on my desktop.

    I have a Dell laptop, running Windows XP. Of late I have had issue with my Yahoo mail account when I am on the laptop. I do not have issues when I work on my desktop, which is running Windows 7. I wonder if my Firefox browser has been corrupted (I update whenever asked, so I am now running 3.6.11). Can I u n-install it and start over? How would I do that?

    With Mac OS X (10.4.7) as in your signature you will not be able to use iCloud, so use the Finder to transfer your movie:
    If you have turned on File-Sharing in the System Preferences "Sharing" tab, you can drag the video to your "Public" folder on your Laptop and retrieve it from there on your desktop computer, assuming this is also a mac.
    You can connect your MBP using usb or Firewire to your desktop computer and boot the the MB in target disk mode (Hold down the "T" key while restarting your MBP). Then your desktop computer will see your MBP as an external disk and you can copy the movie directly.
    Regards
    Léonie

  • PDF's in Acrobat Reader X will not open when using the browser, Internet explorer opertes all ok? Mozella 4 is the default browser! Windows XP Home ed with all latest updates!

    When using the Mozella Firefox 4 browser and the NEW version Adobe Reader X, PDF's online will not ever open. After 1-3 minuites, I eventually get a message the Adobe reader is running, but need to close and try again! I get same results when trying again.
    Internet Explorer operates and opens the online PDF's all ok and the Adobe Reader X seems to operate all else ok!
    I think, but not sure, that this issue appeared when the Adobe Reader updated from the older version 9 or so to the NEW Adobe Reader X version about 1 or 2 weeks ago, but not sure. I just remember that Mozella always worked ok previously to the Adobe Reader X version for opening online PDF's last month, etc.
    Note that I said that Internet Explorer browser operates ok Using the New automatically upgraded Adobe Reader X for viewing PDF"S! (adobe notified me that the new version 10 (X) was available for updating, etc) I also just discovered that google chrome browser opens the online PDF's ok!
    I have not trying re-storing the computer to the previous month, etc, since the issue seems to be with Mozella not liking the Adobe Reader X version and Internet Explored browser operating ok!
    Any ideas????

    I had the same problem and my solution was to disable the PDF extension that came with Firefox 4 which belongs to another company. I found out that it wast interfering with ReaderX. I unabled it and restarted Firefox. I have had no problems since then. Go to Tools, Add-On and click on Extensions and disable the PDF extension. I hope this helps

Maybe you are looking for

  • How to open a html file in a region on same page

    Hi, I am trying to create a page where I have 2 regions. The left region,"lef_reg" has been created using HTML contains some text values. The right region, "rig_reg" is blank. I want that if a user clicks on a link on the left region (lef_reg) then a

  • I have adobe student free with my school and it switched me to a free membership. How do I renew it?

    I need to upgrade my adobe through my school and it wont work. I am supposed to get adobe free through my school every year and my membership expired and didn't renew. How do i renew it?

  • Calling stored procedure from within container TX

    Hi I am calling a stored procedure that resides locally (Oracle) from within a session bean after updating a number of ejb's. The stored procedure works fine if it performs a simple delete. However, the stored procedure is in turn calling another sto

  • How to read from input file and pass to script

     How can I get rid of the hard coded PATH statement and feed script based upon text file input.    Input is contained in a file.. 'C:\cntprocess\   called sistemfolder.txt that has 2 fields folder then shortname. example:  C:\cntprocess\REW1___1~Rew1

  • Duplicate layer appearance between documents

    Hi there, I use a javascript that copies all objects within a layer to a new layer in a new document. This works fine as all appearances are attached to the objects but appearances applied to a layer will not be duplicated (as the objects are copied