Count of windows in Safari returns one more than actual

First of all I'm completely new to Applescript.
What I do at the moment is to search for scripts that might do something similar to want I want and then modify them to suit my particular requirements.
I have been trying to use a script that searches for a particular URL in Safari.
Here is an excerpt from the script:-
tell application "System Events"
     tell application "Safari"
          set windowCount to count of windows
          repeat ...
     end tell
end tell
The problem is that the value returned by "set windowCount to count of windows" returns a value which is one more than the actual number of Windows that are open.
Can anyone tell me why it is going wrong?
Many Thanks
I'm using Script Editor 2.7(176), AppleScript 2.4 on a late 2008 MacBook running Yosemite 10.10.2 and Safari Version 8.0.3 (10600.3.18)

Hi,
Try this (don't use this script in the 'tell application "System Events"' block) :
set tUrls to {}
tell application "Safari"
    repeat with thisWind in (get windows whose its document is not missing value)
        repeat with thisTab in (get tabs of thisWind)
            set t to URL of thisTab
            if t contains "search string" then set end of tUrls to t
        end repeat
    end repeat
end tell
tUrls

Similar Messages

  • Opening hotmail: Please refresh your browser window, When you access your Windows Live Hotmail account from more than one computer, we ask you to sign in again to help keep your account private and secure . Refreshed but no change. in Safari no problem

    opening hotmail in firefox: Please refresh your browser window, When you access your Windows Live Hotmail account from more than one computer, we ask you to sign in again to help keep your account private and secure . Refreshed but no change. in Safari no problem

    Go to '''Options '''on Firefox Browser-->'''Advanced'''-->''Click on'' '''Network '''tab-->''Select '''''Settings'''-->''Select '''''Use System Proxy Settings
    '''

  • Windows 8 OS taking up more than 100 GB on my new yoga 11s

    I don't know how to solve this.  I feel like I need an advanced degree in computer science to deal with all this windows 8 frustration.  I have a new 11s yoga--well not new enough or it would be going back to Best Buy.  I barely have anything downloaded on it, but the windows 8OS is taking up more than 100 GB on my system.  It has barely any memory left, I is showing in RED and warning me sometimes to close other apps.  I noticed that windows 64 bit only requires 20gb to download--why in the world is mine taking dangerously high levels of my GB?  Please help. 

    Windows 8 should not use anywhere near that much memory.  I have a Yoga 13 which should be fairly similar, and there is only 31GB used on the harddisk, and this additionally includes half a dozen games, Microsoft Office, and a few more apps.
    Have a look at how much memory all the installed Apps are using, you can do this from the Metro interface by sweeping in from the right hand side of the screen, selecting Settings, then choose "Change PC settings", choose "Search and apps", then choose "App sizes", this will allow you to identify if there is one application that has used up all the disk space.
    You can also find the size of all the applications installed from the Control Panel (access by typing "control panel" in search box after sweeping in from the right in Metro), select Programs, then "Programs and features", then click on the column header "Size" to see if there are any installed applications taking up all the hard disk.
    Another option is to go to the Desktop, open the File Explorer, then click in the search box to the upper right.  This will open the Search toolbar, within which is a drop down entitled "Size", click on this and select "Gigantic>128MB".  This will display any large files, for example on my Yoga there is a single file "MEMORY.DMP" that is 543MB.  Have a look and see if there are any really large files that are using up your hard disk space.
    Another couple of thoughts, do have any external personal audio/video devices that are synced with the computer? For example if you have an MP3 player with 64GB of memory that is full of music that you have synced with the computer then that would fill the remaining hard disk space.
    I understand it can seem a little daunting trying to work out what is going on, personally I think it is worth perservering as the Yoga is a really nice laptop.  You of course have to realise that it is a very advanced piece of technology and software, but in being that advanced by definition it does mean that it is not as simple to operate as a lot of consumer gadgets.
    Good luck in working out what is using up all the hard disk space.

  • Return to more than columns from LOV

    I need return to more than columns from LOV. All columns belong to one form region
    Please helpl me
    Mary

    Hi Mary,
    Do you mean you need to return more than 3? If so then in the link area change the Target to URL and do something like the following:
    f?p=&APP_ID.:7:&SESSION.::&DEBUG.::P7_UNIQUE_ROWID,P7_OET_TBL_NM:#UNIQUE_ROWID#,#OET_TBL_NM#Items on left separated by commas, values on right separated by commas and a colon (:) in the middle...make sure the items & values are placed in the same order.
    Mike

  • How to capture a window in Safari that is bigger than the screen

    How do I capture a window in Safari that is larger than the screen it is displayed upon? I am using a MacBook PRO 13" with Mavericks.

    Try Paparazzi

  • How can I make Function return varchar2 more than 4000

    I have a function
    FUNCTION testing (v_pk_application in number, v_inccharges in char)
    return varchar2(30000)
    --return number
    is
    v_net_sum varchar2(30000);
    v_net_sum2 varchar2(30000);
    v_datarow varchar2(3000);
    v_datarow2 varchar2(3000);
    begin
    return v_net_sum;
    end;
    I want to return varchar2 more than 4000, how can I do that.
    Thanks

    user10659388 wrote:
    I want to return varchar2 more than 4000, how can I do that.A function can return a string up to the maximum allowed for varchar2.
    Varchar2 can be up to 32767 characters...
    SQL> create or replace function ret_str return varchar2 is
      2    v_str varchar2(32767);
      3  begin
      4    v_str := lpad('*',32767,'*');
      5    return v_str;
      6  end;
      7  /
    Function created.
    SQL> declare
      2    v_retstr varchar2(32767);
      3  begin
      4    v_retstr := ret_str();
      5  end;
      6  /
    PL/SQL procedure successfully completed.However, SQL only supports varchar2 up to 4000 characters so the same function will cause SQL to error, even though the function is perfectly valid.
    SQL> select ret_str() from dual;
    select ret_str() from dual
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at "SCOTT.RET_STR", line 5
    SQL>So, if you intend to use the function only in PL/SQL then you can use varchar2 up to 32767 characters, but if you intend to use it in SQL then you will be limited to returning 4000 characters. Alternatively you can return a CLOB which SQL supports but they are a little more tricky to work with than varchar2...
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace function ret_str return clob is
      2    v_str clob;
      3  begin
      4    v_str := lpad('*',32767,'*');
      5    return v_str;
      6* end;
    SQL> /
    Function created.
    SQL> select ret_str() from dual;
    RET_STR()
    SQL>

  • LOV Return To More Than One Column

    Hello,
    How could I return LOV values to more than one column?
    I created a dynamic LOV based on sql statement. I would like to return more than one values to multiple columns in my page.
    E.g. When user selects employee number name, department and location to return to respective columns.
    Any help is highly appreciated.
    I am using APEX 3.2.0.
    Thanks

    hi,
    Below link might help you.
    http://rutgerderuiter.blogspot.com/2008/10/update-multiple-items-from-lov-field.html

  • Problems deploying Windows 7 x64 computers with more than 8GB RAM

    SCCM 2012 R2 CU1
    Windows 7 x64
    We have a weird problem after upgrading from SP1 to R2 CU1. We have built a Windows 7 64 bit image with the latest updates (currently September 2014 updates). It deploys fine to all computers. But after some days – don’t know exactly – guess after 4-7 days
    - we start getting errors on computers with more than 8 GB of RAM. The errors just start out of the blue. We didn't change TS, image or driver package.
    The error shows in 3 different ways – depending of the computer model.
    1) BSOD – STOP 0x000000F4. Disk error.
    2) Task Sequence error 0x87D00269 when installing the first Application in TS. The error seems to have something to do with Management Point not found.
    3) Task Sequence simply stops after installing CMclient. No errors - it simply stops.
    For instance we get the BSOD on the Lenovo ThinkCentre M93p. But on the ThinkCentre M83 we get the TS error 0x87D00269. M93p and M83 uses the same driver package. They consequently  fail every time after the error has begun. If we reduce (remove physically)
    the memory to max. 8GB of RAM, they successfully run the Task Sequence.  We get the above errors on both Lenovo and HP machines with more than 8GB. 
    I made a copy of the production TS and started testing. I created a new driver package for M93p/M83. It contains only the NIC drivers. Now M93p an M83 successfully finishes the TS. Adding sata or chipset or MEI/SOL drivers to the package I get the 0x87D00269
    error on both m93p and M83. At least not the BSOD on the M93p ;-)
    Tried setting  SMSTSMPListRequestTimeout to 180 in the TS. Also tried putting in a 5 minute break before installing the first Application in the TS. Also tried putting in SMSMP=mp1.mydomain in the installation properties for the CMclient. It is still
    the same problem.
    Investigating the smsts.log on a computer with the 0x87D00269 error.
    Policy Evaluation failed, hr=0x87d00269 InstallApplication
    25-09-2014 08:59:59 3020 (0x0BCC)
    Setting TSEnv variable 'SMSTSAppPolicyEvaluationJobID__ScopeId_654E40B7-FC55-4213-B807-B97383283607/Application_d9eea5a0-0660-43e6-94b8-13983890bae2'=''InstallApplication 25-09-2014 08:59:59 3020 (0x0BCC)
    EvaluationJob complete InstallApplication25-09-2014 08:59:59 3020 (0x0BCC)
    MP list missing in WMI, sending message to location service to retrieve MP list and retrying. InstallApplication 25-09-2014 08:59:59 3020 (0x0BCC)
    m_hResult, HRESULT=87d00269 (e:\qfe\nts\sms\client\osdeployment\installapplication\installapplication.cpp,1080) InstallApplication
    25-09-2014 08:59:59 3020 (0x0BCC)
    Step 2 out of 2 complete InstallApplication 25-09-2014 08:59:59 3020 (0x0BCC)
    Install application action failed: 'SCIENCE PC Guide'. Error Code 0x87d00269 InstallApplication 25-09-2014 08:59:59 3020 (0x0BCC)
    Sending error status message InstallApplication 25-09-2014 08:59:59 3020 (0x0BCC)
     Setting URL = http://mp1.mydomain, Ports = 80,443, CRL = false InstallApplication 25-09-2014 08:59:59 3020 (0x0BCC)
    Investegating the 0x87D00269 error on the siteservers Status Messages Queries is weird.
    Install Static Applications failed, hr=0x87d00269. The operating system reported error 617: You have attempted to change your password to one that you have used in the past. The policy of your user account does not allow this. Please select a password that
    you have not previously used.
    Hopefully this is a bug in translating the errorcodes? Just to be sure I checked all the SCCM serviceaccounts and none of them have expired passwords.  And again why only on computers with more than 8GB RAM.
    Anyone else had problems rolling computers with more than 8GB og RAM?
    Why does this happens after a few days? To begin with, it runs just perfect and then starts failing on all machines with more than 8GB. Without a change in TS, image and driverpackage. We have seen this pattern for the last 3 month after
    updating our image with the latest Windows Updates. It all started after updating from SP1 to R2 CU1.
    Why does it only affect machines with more than 8GB RAM?
    How to get rid of the 0x87D00269 error?
    Seems to be somehow related to driver installation mechanism in SCCM in combination with Windows 7 64 bit, +8GB RAM and SCCM 2012 R2 CU1 or perhaps just R2.
    Any help or hints would be appreciated!
    Thanks
    Anders

    We have the same workaround, using a x64 boot image resolved all our issues with WinPE 5.0.
    Machines with >4GB of RAM
    Lenovo ThinkPad T540p failed applying drivers with 80040005
    Black screen/white cursor issues intermittently
    No updates from Microsoft, they are still looking through the logs, but we have updated our boot images and all is well now. Our case it still open with Microsoft, they are researching the logs.
    Daniel Ratliff | http://www.PotentEngineer.com

  • QTY in return order more than billed QTY

    hi
    i am trying to rasie an return order with ref to billing doc and copying the quantity.
    Though the qty is getting copied from ref doc,i am able to increase the qty more than billed.
    the system is through an waring msg ,but allowing me raise the return order with greater qty.
    Same is with subsequent delivery free of charge too,i am able to raise order with this doc type w.r.f to return order and giving greater qty than ref doc.
    it is allowing me to go ahead the finish the sales cycle.
    Can any one guide me how to restirct the system from taking qty if it greater than the qty from the ref doc?
    how and the path in spro please.
    thanks
    shashi

    Dear Mr Chavva,
    Trust the message is as follows:-
    Class :V4 and Number: 229.
    Body of the message is:
    Item &1: Order quantity (&2) greater than billed quantity (&3).
    If so kindly attempt the following:-
    using transaction OVAH kindly locate the message and change its settings from W (warning) to E (error).
    Kindly simulate the transaction, expecting it to fail.
    In case of disappointments, kindly explore a setting the user exit MV45AFZZ disabling saving of the document in case the quantity exceeds reference document quantity.
    Trust the reply is useful.
    Regards,
    K Gopidas.

  • Is there a way of setting up one more than one export preset to a funcion key?

    Hi
    is there a way of setting up Lightroom to export images in using more than one export preset at one time? When I have edited my photos I very often want to create a full res JPEG to upload to Zenfolio with no watermark, a medium res JPEG to go to Flickr and a 1500px image with a watermark for Facebook (I normally upload these last). I'm hoping Lightroom would also have a an option to set Function keys to trigger export presets for example.
    I'd like to be able to stack export presets to help with my workflow.
    Thanks
    Jon

    robcole.com - ExportManager
    does what you want, as long as you don't need post-process actions in your export preset(s).
    plugin | free | I wrote it..

  • Audigy 2 ZS with Windows 7 64-Bit and more than 4GB of RAM

    Hello,
    I'm using Windows 7 Pro 64-Bit and I have installed 8GB RAM. I installed the latest Beta driver and I'm not able to use my microphone. It doesn't recognize any input at all. As soon as I remove 4GB RAM so only 4 GB RAM remain everything works as expected. The microphone problem is only there when you have more than 4GB RAM installed. Is there any driver or workaround to make the microphone work again?
    I don't want to
    use another version of Windows 7<
    reduce my RAM<
    use onboard sound<
    I hope you can help me or at least tell me if (and when) Creative wants to fix this.
    Thank you. Kind regards
    T3rm

    No solution from me, but I just wanted to chime in because I have the same problem and I'd like to explain it in detail. I've actually had this problem with Vista 64-bit (6GB of RAM) for the past 2 years. It's a very flaky/random problem, where about 40% of the time the microphone worked fine, 20% where I would get minor crackling (turns my voice into a robot voice), 20% with MAJOR crackling, and 20% where the microphone didn't work at all. When it would either crackle or stop working, I would usually restart the computer. After the computer booted up again, it would work fine 95% of the time (I very rarely had to reboot it twice in a row). However, it would randomly change states (between the four listed above) throughout the duration of the computer staying on. And, it would usually progress in the direction of "being more and more broken". For example:
    .) Wake up, turn on my computer. Everything works fine.
    2.) Go to class, come back. Now the microphone crackles.
    3.) Do some homework, eat dinner. Now the microphone doesn't work at all.
    I was excited when the SBAX_PCDRV_LB_2_8_00.exe update came out in July so I can finally get a consistent working microphone in a 64-bit version of Windows. Then everything came together last week, when I got a copy of Windows 7 64-bit Professional from my school. I tried the drivers and....FAIL. Pretty much the same thing, but different percentages/tendencies than listed above for Vista.
    I just found this on another thread which highlights some useful information:
    Microphone issues on Windows 7/Vista 64-bit (x64) with 4GB?of RAM or more
    Audigy driver does not support 64-bit addressing, resulting in random issues with the Microphone (static, robotic or distorted voice, white noise).
    Workarounds:
    - install the 32-bit (x86) version of Windows
    - limit the RAM available to Windows to less than 4GB
    - enable Memore Hole in BIOS Setup, if?your motherboard supports the setting
    Haha, why even release a 64-bit "compatible" driver when it doesn't even work right in 64-bit operating systems? Should I not expect a proper driver and buy an Asus Xonar instead?

  • Returning not more than three rows???

    Hi guys,
    can somebody told me how I can tell a query to not return more than three
    rows??? Can somebody told me that?
    This is my query:
    select distinct a.PRIO from POI.ASSETTYPE a,POI.ASSETREIHE ab
    where ab.STYPID=a.STYPID
    and ab.MATCH='fonds'
    and ab.DATUM='31.05.2002'
    order by a.PRIO
    I want that the query do not give back more than three rows.
    Thanxx
    Schoeib

    Hi Schoeib,
    just add a 'WHERE ROWNUM < 4' to your statement!
    Hth, regards
    Bernhard

  • Changing the Window Color of an JInternalFrame more than once

    I want to change the color of an JInternalFrame when it was created. This could be more than once.
    I know that i can use:
    UIManager.put("InternalFrame.activeTitleBackground", Color.RED);
    but this code only takes effect before the InternalFrame is createt

    You are using iPhoto 9 (11)? If you are then the themes would be obvious when you select iPhoto as your mail client in iPhoto's General preference pane (upper left hand image)
    Click to view full size
    and then use the Share ➙ Email button
    Click to view full size
    to get this window:
    Click to view full size
    However, I was mistaken in that the background colors for those themes can't be changed. The same goes for the stationary themes in Mail.

  • Windows 7 - Unable to Print more than 15 PDF's by right clicking

    Hi guys,
    I've just upgraded quite a lot of PC's within the business I work for.
    The new PC's are Windows 7 OS based. When you right click more than 15 PDF's the option to print is not there.
    Is the a fix for this?
    Checked this on Windows XP and it works. Checked previous versions of Adobe Reader and these have the same print problem.
    Thanks
    Gareth

    Agree with previous - this is a new "feature" of W7 to accompany their considerably worsened search programming.  I keep XP platform on the side to perform both functions for some time now without any apparent instability.

  • LOV not return values more than certain limit

    Hi Guys,
    I have created 2 search fields (State, Area) in report page. Both of them are LOVs based. User select first field value, next field's LOV return values based on the first field( AJAX call). First field is states like 'VIC', 'NSW', 'SA' etc..., next field is 'Area'. when I select state other than 'NSW' in state field then next field is populated successfully. But when I select state as 'NSW' then next field is blank. 'NSW' state has records more than 100 in the table(LOV based on), but all other states have even less than 10 records. when I remove (more than 50) records of 'NSW' in the table then It works.
    Can anybody know if there is a limit of LOV that can be supported?

    Thanks Varad for reply.
    As you suggested to change gReturn = get.get('XML') to gReturn = get.get() for text values, But it is not simple as you said.
    I have found the problem. Actualy, there are some special characters in database column that suppose to return in LOV. But LOV is returned as xml object that may not support special characters (&,$, % etc...). I have put the 'replace' function in query. My query is like
    select replace(name,'&','and') d, id r
    from table1
    where val1 = :P2_val
    order by 1
    This query works in SQL WORKSHOP but not in AJAX. Any Idea? If I have to replace get.get('XML') to get.get() then what other steps I have to perform?

Maybe you are looking for

  • HR: POSTINGS TO FINANCIAL ACCOUNTING

    Below is the menupath for HR postings to FI. I want to understand where are they linked to FI. How can I see the G/L accounts these symbolic accounts are linked to. SPRO -- Payroll -- Payroll USA -- Posting to Financial Accounting -- Activities in HR

  • Java SCS add-in install Error: role ORA_SID is not created yet.

    Greetings, I'm trying to get the Java add-in installed on a recently upgrade BI 7.0 system (ABAP WAS) - NON-Unicode. I'm erroring in SAPinst at "Defining the environment for user _______" I have applied the changes recommended in note 921595 and cont

  • Change of original partition - update problem

    Hi. I have a iMac 27" Sales Number(s): MC814LL/A Processor: 3.1GHz Core i5 (Quad-core 2400) Model #: A1312 It got a new harddisk and it can't update to OS 10.8.4 after that change. I have been told that this is caused by "change of the original parti

  • Can't use full mirror function for apple tv after downloading mountain lion

    I've just downloaded mountain lion, and don't seem to be able to use the full mirror funtion to my apple tv (software 5.0.2) i can only mirror videos playing in my itunes like before the update. I've looked at videos on youtube, and i don't seem to h

  • Gettirn Run time error

    Hi, I am doing post goods issue in delivery document but getting run time error.can anybody help me to solve this issue, Error: Runtime Errors:GETWA_NOT_ASSIGNED   Short text:Field symbol has not yet been assigned.    What happened?Error in the ABAP