Hi,
I was wondering if you can think of any way to do the following:
Create a shell button labeled something like "this is a popup" that would
- close the current window
- add the URL of the window to a text file list of additions to be considered
The last part (adding the URL) would be easy enough to do in a script, proveded there was an easy way to retrieve the current URL. That doesn't show up in the registry anywhere, does it? (I wouldn't think so, since PWB can be run without installing it first). The first part would also seem do-able, maybe using the SendKeys functions or similar.
I just thought this would be an easy way for patrons to help us fight the war against popups
Thanks!
Idea for a shell button - is this possible?
Moderators: Tyler, Scott, PWB v2 Moderator
I put together a short script that comes close, in case you're interested:
Dim PopFile
Dim YesNo
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Set WshShell = WScript.CreateObject("WScript.Shell")
Set filesys = WScript.CreateObject("Scripting.FileSystemObject")
YesNo = WshShell.Popup("Are you sure you want to report this window as a pop-up, and close this window?", 10, "Report PopUp", 4+32)
if YesNo = 6 then
WScript.Sleep 2000
WshShell.SendKeys "%{F4}"
set PopFile = filesys.OpenTextFile("{filename}", ForAppending)
PopFile.WriteLine("A POPUP WINDOW WAS JUST REPORTED")
PopFile.Close
YesNo = WshShell.Popup("Thank you!", 2, "Report PopUp", 0+64)
end if
WScript.Quit()
As long as "SecondWindow - AlwaysOnTop = false" it looks like it works.
Dim PopFile
Dim YesNo
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Set WshShell = WScript.CreateObject("WScript.Shell")
Set filesys = WScript.CreateObject("Scripting.FileSystemObject")
YesNo = WshShell.Popup("Are you sure you want to report this window as a pop-up, and close this window?", 10, "Report PopUp", 4+32)
if YesNo = 6 then
WScript.Sleep 2000
WshShell.SendKeys "%{F4}"
set PopFile = filesys.OpenTextFile("{filename}", ForAppending)
PopFile.WriteLine("A POPUP WINDOW WAS JUST REPORTED")
PopFile.Close
YesNo = WshShell.Popup("Thank you!", 2, "Report PopUp", 0+64)
end if
WScript.Quit()
As long as "SecondWindow - AlwaysOnTop = false" it looks like it works.