Simpel

read out count of my notifications autoitscript.com

6 posts in this topic

Hi,

I read the forum rules and the passage "interacting with this website", too. I'm not completely sure whether it would be ok to read out my count of notifications by script (there is no automated login) as I do on a private forum where I am the webmaster. There I once in a minute read out unread posts like this:

#include <inet.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>

Local $iTreffer = ""
Local $sPause

$hGUI = GUICreate('Ungelesen', 55, 20, @DesktopWidth - 166, 0, $WS_POPUP + $WS_BORDER, $WS_EX_TOPMOST + $WS_EX_TOOLWINDOW)
$hDragLabel = GUICtrlCreateLabel("", 0, 0, 20, 20, -1, $GUI_WS_EX_PARENTDRAG)
$hIcon = GUICtrlCreateIcon("shell32.dll", 7, 2, 2, 16, 16)
$hTreffer = GUICtrlCreateLabel($iTreffer, 20, 0, 35, 20,$SS_CENTER)
GUICtrlSetFont(-1,14)
GUISetState(@SW_SHOW)

Auslesen_Treffer()
GUICtrlSetData($hTreffer, $iTreffer)

While 1
    $sJetzt = TimerDiff($sPause)
    If $sJetzt > 60000 Then
        Auslesen_Treffer()
        GUICtrlSetData($hTreffer, $iTreffer)
    EndIf
    Sleep(100)
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

Func Auslesen_Treffer()
    $sPause = TimerInit()
    $source = _INetGetSource("https://xxx.yyyy.de/search.php?search_id=unreadposts") ; your forum here
    If @error Then
        $iTreffer = ""
        Return
    EndIf
    $sTreffer = StringRegExp($source, "Die Suche ergab \d*? Treffer", 1)
    If $sTreffer = "0" Then
        $iTreffer =""
        Return
    EndIf
    $sTrimTreffer = StringTrimLeft($sTreffer[0],16)
    $iTreffer = Number(StringTrimRight($sTrimTreffer, 8))
EndFunc

Is it allowed to catch the count of notifications from autoitscript.com that way? I always log in personally by website.

As I looked into the html source code of autoitscript.com I couldn't find something like the count of notifications. Where could I find it?

If my post is against the rules, I apologize, and I would delete the post immediatly.

Regards, Conrad

Share this post


Link to post
Share on other sites



Simpel,

As long as this is a "one-off" read after login and not a repetitive query I do not see it as a problem.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Ok, so you think as my example above shows once in a minute is against forum rule part:

  • "Other abuses which are either examples of excessive bandwidth usage or automation of the site."

So I should respect this. 

Until now I couldn't identify the part in "notifications.htm" that describes the count of unread/unseen notifications.

Suggestions? Regards, Conrad

Share this post


Link to post
Share on other sites

Simpel,

Quote

so you think as my example above shows once in a minute is against forum rule

Exactly.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Ok, so let's think about the following: I have an opened IE-window with the Forum logged in. Even if the IE is minimized I can hear a "pling" (if I have loudspeakers) when a new notification appears and there comes an icon with a counter. 

Is there a possibility to grab the current content of this IE-window and read out if there is a counter icon?

Regards, Conrad 

Share this post


Link to post
Share on other sites

Simpel,

As I stated earlier, doing this as a one-off is fine, but not if it is repetitive - which it would have to be to react to a new notification. So stop trying to find wiggle room to make it legal - there is none and I am closing the thread so as not to waste any more time having to explain for a third time.

Besides if you get a "pling" why do you need the count? Is it really so important to know about how many forum notifications have been made so quickly?

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Similar Content

    • S3cret91
      By S3cret91
      Sers,
       
      while working on another project I was in need of desktop notifications. I wanted an own implementation and from time to time the code grew and I thought about sharing it with the world. I know that there is a similar UDF out there but when my project got bigger an UDF was the best choice for me. As you can see the UDF's differ in usage and style of notifications.
       
      So, what do we have?
      The UDF offers the usage of permanent desktop notifications for your own script in a very easy way. Notifications are starting in the bottom right corner of your main screen and will be shown on top until there is no more space. Further notifications will be shown if previous ones are closed. The notifications have a nice minimalistic design in two colors. By default they match the look of the dark taskbar in Windows 10, but colors and other things can be set differently if wished (see example scripts). The UDF works for GUIOnEventMode activated and deactivated and detects it automatically.
       
      Show me!
      Each notification has its GUI, a title, the message, a seperating line, date label, time label and a closing button (and if activated, a border around the notification). The color of the title, message, seperating line, date, time and closing button (+ border if activated) have all the text color.

      Right now notifications have a fixed size. I thought about variable sizes but did not add it because I didn't need it so far.
      Some people may notice the shorter seperating line when border is activated, thats just because of better looks
      Notifications will be colored as the following:
      Windows 10: they match the design of the taskbar Windows 8/8.1: On most designs: they match the border color of active windows, else they are black with transparency (see screenshot) Windows 7 and earlier: black with transparency (sry aero)  
      How do I use notifications in my script?
      include UDF call _Notifications_Startup() (after you determined if you want to use GUIOnEventMode or not) If GUIOneventMode deactivated: call _Notifications_CheckGUIMsg($__GUIMsg) in your main loop create a notification using _Notifications_Create($__title, $__message)  
      Between step 2 and 3 you can set various options:
      _Notifications_SetAnimationTime _Notifications_SetBorder _Notifications_SetButtonText _Notifications_SetBkColor _Notifications_SetColor _Notifications_SetDateFormat _Notifications_SetSound _Notifications_SetTextAlign _Notifications_SetTimeFormat _Notifications_SetTransparency  
      You can also set own functions to be called when notifications are clicked (see advanced example).
       
      And now?
      You can find more information in the UDF.
      There also are two example scripts to show the usage for GUIOnEventMode activated and deactivated. Another advanced example shows the usage of the Set-Functions.
       
      Thats it?
      Yup, have fun.
       
      Changelog
       
      Notifications.au3 ( v1.2)
      Notifications GUIMsg Example.au3
      Notifications OnEvent Example.au3
      Notifications Advanced Example.au3
       
       
    • dieterhatn
      By dieterhatn
      Hello there!
      I've recently updated to Windows 10 and saw that new and beatiful info center for notifications.
      A lot of applications already support it, so I'm curious if I can get my autoit script to use the windows native notification system.
      Any help is much appreciated
      Thanks in advance
    • MarkRobbins
      By MarkRobbins
      Creeper v0.1.1
      Creeper is a 'heads up display' notification window that appears at the bottom of the screen and moves to the top and fades away.
      It is a window that is semi-transparent, and transparent to clicks.
      Creeper is not a UDF, but rather a stand-alone script to be invoked from the command line or another script.
      Many notifications can be launched this way in succession without complications.
      Pressing right ctrl and left ctrl will remove all notifications from the screen at any time.

      Creeper uses an embedded IE object and is thereby capable of rich html-based notifications.

      The html framework provided consists of:
      An optional title An optional image An optional html body (any html you want) The content parameters are:
      title html image Full styling for the framework involves parameters:
      bordercolor, borderwidth, borderstyle, padding, width backgroundcolor, color font, fontsize titlefont, titlecolor imagewidth, imageheight Special parameters are:
      fmtini fmtname outhtml autodel  
      Specifying Command Line Parameters
      Specification is made easy by using named parameters, so the command line parameters can look like:
        "name1[,name2]..." "<value for name1>" "<value for name2>"

      Parameters for a simple message could look like:
        "title,html" "My Title" "Some html with <b>markup</b>"

      To make this even easier, a formatting ini file can be referenced, and parameter values picked up from there:
        "title,html,fmtini,fmtname" "My Title" "Some html with <b>markup</b>" "C:some.ini" "sectionname"

      Even more, a registry key can be used for all parameters:
        "2013.07.28.14.37.12.722"

      Templating is also supported, so if you have a html value that looks like:
        Hi, my name is %(name)

      ...then your command line can look like:
        "fmtini,fmtname,title,$name" "C:some.ini" "sectionname" "My Title" "George"

      where the html value in this case is picked up from the ini


      The other great feature of Creeper is that it can log its messages to a specific point in any html file:
        "html,outhtml" "Log this html" "C:some.html"
       
      Next Steps
      Examine the code comment header. The file will run without parameters using internal defaults. Let me know if you have any issues or have any solutions to the issues given.
      Caveats
        Its v0.1, so read the issues in the comments. The functions do not have thorough documentation headers since this is not a UDF, but the functions are simple and have single line explanations. Also, not a lot of error handling going on at this stage
      History
      Edit - Update to v0.1.1
       
      TestCreeper.au3