Creating a random number within a URL using Applescript

Discussion in 'Mac Programming' started by moorbull, Jul 19, 2012.

  1. moorbull macrumors newbie

    Jul 19, 2012

    I'm quite new to applescript and guess this may be easy for some of the more experienced users to answer but I'm wondering..

    How can I generate a random number with a URL and then get safari to visit the URL..

    So for example.. NUMBER)&something=......

    Thanks a lot
  2. kryten2, Jul 19, 2012
    Last edited: Jul 19, 2012

    kryten2 macrumors 6502a

    Mar 17, 2012
    -- random number between 0 and 1000
    set randomNumber to (random number (1000)) as text
    open location "" & randomNumber & ")&something=....."
    set theURL to "" & ((random number (1000)) as text) & ")&something=....."
    open location theURL

Share This Page