Jump to content

Search the Community

Showing results for tags 'prowl'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Hi All, In a recent project of mine I needed to send multiple message to an app on my Iphone called Prowl. Hopefully this will come in useful to someone. #Include-Once #include <WinHttp.au3> ; #INDEX# ========================================================================================= ; Title .........: Prowl UDF ; AutoIt Version : 3.3.8++ ; Language ..... : English ; Description ...: Functions for use with Prowl App (http://www.prowlapp.com/) API ; Author(s) .....: mrflibblehat (danielcarroll@gmail.com) ; ================================================================================================= ; #GLOBALS# ======================================================================================= Global Const $vProwl = "api.prowlapp.com" ;~ Prowl API Site Global $vOpen = 0, $vConnect = 0 ; ================================================================================================= ; #CURRENT# ======================================================================================= ;_Prowl_Open ;_Prowl_Close ;_ProwlAdd ; ================================================================================================= ; #FUNCTION# ==================================================================================================================== ; Name...........: _Prowl_Open ; Description ...: Create Session and Connection Handle ; Syntax.........: _Prowl_Open ; Return values .: Failure - Returns 0 and Sets @Error: ; |@error = 1 - Error Opening WinHTTP Handle ; |@error = 2 - Error Opening WinHTTPConnect Handle ; Author ........: mrflibblehat (danielcarroll@gmail.com) ; =============================================================================================================================== Func _Prowl_Open() $vOpen = _WinHttpOpen() if (@error) then Return SetError(1, 0, "Error Opening WinHTTP Handle") $vConnect = _WinHttpConnect($vOpen, $vProwl) if (@error) then Return SetError(2, 0, "Error Opening WinHTTPConnect Handle") EndFunc ; #FUNCTION# ==================================================================================================================== ; Name...........: _Prowl_Close ; Description ...: Close Session and Connection Handle ; Syntax.........: _Prowl_Close ; Author ........: mrflibblehat (danielcarroll@gmail.com) ; =============================================================================================================================== Func _Prowl_Close() _WinHttpCloseHandle($vConnect) _WinHttpCloseHandle($vOpen) EndFunc ; #FUNCTION# ==================================================================================================================== ; Name ..........: _ProwlAdd ; Description ...: ; Syntax ........: _ProwlAdd($vAPIKey, $vEvent, $vDescription[, $vPriority = 0[, $vApplicationName = "Prowl 4 AutoIT"[, $vProviderKey = ""[, $vURL = ""]]]]) ; Parameters ....: $vAPIKey - Prowl API Key ; $vEvent - Name of Event. ; $vDescription - Message to Send. ; $vPriority - [optional] Priority of Message. Default is 0 - Normal. -2 - Very Low | -1 - Moderate | 0 - Normal | 1 - High | 2 - Emergency ; $vApplicationName - [optional] Application Name. Default is "Prowl 4 AutoIT" ; $vProviderKey - [optional] Your provider API key. Only necessary if you have been whitelisted. Default is "". ; $vURL - [optional] Requires Prowl 1.2 The URL which should be attached to the notification. Default is "". ; Return values .: XML response from server ; Author ........: mrflibblehat (danielcarroll@gmail.com) ; =============================================================================================================================== Func _ProwlAdd($vAPIKey, $vEvent, $vDescription, $vPriority = 0, $vApplicationName = "Prowl 4 AutoIT", $vProviderKey = "", $vURL = "") Local $sData = ("apikey=" & $vAPIKey & "&application=" & $vApplicationName & "&event=" & $vEvent & "&description=" & $vDescription & "&priority=" & $vPriority & "&providerkey=" & $vProviderKey & "&url=" & $vURL) Local $vRequest = _WinHttpSimpleRequest($vConnect, "POST", "/publicapi/add/", $WINHTTP_NO_REFERER, $sData, "Content-Type: application/x-www-form-urlencoded") if (@error) then Return SetError(3, 0, "Unable To Send Request") Return $vRequest EndFunc Example #include <ProwlUDF.au3> Global $vApiKey = "PUT API KEY HERE" _Prowl_Open() _ProwlAdd($vApiKey, "Test", "Test Message") _Prowl_Close()
×
×
  • Create New...