Guest User

Untitled

a guest
Jan 22nd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. set InputFieldUrl to text returned of (display dialog "Welke URL wilt u views geven?" default answer "")
  2. display dialog "U gaat naar deze url: " & InputFieldUrl buttons {"Oke"} default button 1
  3. set InputFieldTimes to text returned of (display dialog "Hoeveel views wilt u geven? " default answer "") as integer
  4. display dialog "U gaat de pagina " & InputFieldTimes & " keer bekijken?" buttons {"Ja", "Nee"} default button 1
  5.  
  6.  
  7. if button returned of result is "Ja" then
  8. tell application "Safari"
  9. activate
  10. make new document at end of documents
  11. set URL of document 1 to InputFieldUrl
  12. end tell
  13.  
  14. tell application "System Events"
  15. tell process "Safari"
  16. delay 10
  17. repeat InputFieldTimes times
  18. delay 1
  19. keystroke "r" using {command down}
  20. end repeat
  21. end tell
  22. end tell
  23.  
  24. end if
Add Comment
Please, Sign In to add comment