Re: new vulnerability on macosxhints through Safari
Re: new vulnerability on macosxhints through Safari
- Subject: Re: new vulnerability on macosxhints through Safari
- From: roncross <email@hidden>
- Date: Fri, 21 May 2004 21:33:01 -0700
Please forgive me if I have offended anyone.
I hope that there are no heart feelings. I just want to be a member of
the community without harassment. I do write simple applescript
applications to do day to day stuff. Although I am not an expert, I am
striving to get better at writing programs. I am here to discuss
applescript and want to become a valuable member. As a token of my
regret, I wrote an applescript that will restart itunes after it
suffers from a network stall. You can save it as an application if you
like -- attachment included. It will automatically load itunes,
restart it if it stops, and count the number of times the network
stalls. Sure it can be improved if I can select the network stalled
dialog box itself, but it is very difficult using system events -- I
tried without success. Therefore, I trigger off the fact that the menu
bar is disabled -- set to false. I guess the question that I have is
where does the network stalled dialog box live? Is it in a place where
I can call it directly? Any help would be appreciated.
[demime 0.98b removed an attachment of type multipart/appledouble]
------------------ Beginning of script ------------------------------
global y
on run
set y to 0
tell application "iTunes" to activate
end run
on idle
tell application "System Events"
tell application process "iTunes"
set x to menu bar item "Window" of menu bar 1
if enabled of UI element of x is {false} then
set y to y + 1
try
tell application "Terminal"
do script "/Applications/iTunes.app/Contents/MacOS/iTunes; exit"
tell application "System Events"
key down control
delay 1
keystroke "z"
delay 1
key up control
end tell
close front window of application "Terminal"
delay 3
end tell
end try
tell application "iTunes"
tell application "System Events"
keystroke (ASCII character 27) -- the num lock key
end tell -- end system events for keystoke
end tell -- end application itunes for keystroke
end if
end tell -- end application itunes for testing enabled
end tell -- end system event for testing enabled
tell application "iTunes" to play
return 5
end idle
on quit
display dialog "the network has stalled " & y & " times"
continue quit
end quit
----------------------------- End of applescript
--------------------------------------
thx
RLC
On May 21, 2004, at 6:19 PM, Walter Ian Kaye wrote:
>
At 12:09a -0700 05/20/2004, roncross didst inscribe upon an electronic
>
papyrus:
>
>
> There is nothing stupid in posting a potential problem that can
>
> damage peoples' computers through viruses, trojan horses, etc...
>
>
There IS something stupid in posting:
>
* an entire Web page instead of a URL to it
>
* HTML format instead of plain text format
>
* alarmist messages
>
>
Perhaps you're new to the Internet and don't know these things yet.
>
Well now you know, so please remember.
>
>
On a related note: if you ever receive email which asks you to send or
>
forward it to many people, DON'T. Those are chain letters, whether
>
they say "9 days later he died" or not. They are social engineering
>
viruses. I don't care if it's the most spiritual poem or heartwarming
>
story -- it's a social virus, and should be deleted. (It's also a
>
violation of America Online's TOS to forward chain letters.)
>
>
>
-W
>
_______________________________________________
>
applescript-users mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
>
Do not post admin requests to the list. They will be ignored.
>
>
thanks
Ronald Cross
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.