Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/14/2017 in all areas

  1. Are you annoyed by the limitations of the standard Windows message dialog created by MsgBox? Would you like to have coloured backgrounds and text? To choose the justification and font? Do you want to be able to place the message box other than in the centre of the screen? Centred on your GUI, for example, or at a particular location on screen? What about having user-defined text on as many buttons as you need? And user-defined icons? Or a visible countdown of the timeout? Finally, would you like to choose whether the message box has a button on your already too-crowded taskbar? If the answer to any of these questions is "YES" then the ExtMsgBox UDF is for you! [NEW VERSION] 16 Feb 24 Changed: Some additional functionality added to the "TimeOut" parameter of _ExtMsgBox: - A positive integer sets the EMB timeout as before. - A negative integer will double the size of the countdown timer if it is used. - A colon-delimited string (eg: "10:5") will set the normal EMB timeout (first integer) and will also initially disable the EMB buttons for the required period (second integer). New UDF and examples in the zip. Older version changes: ChangeLog.txt As always, I realise nearly all of the DLL calls in these UDFs could be made by using commands in other UDFs like WinAPI.au3 - but as with all my UDFs (which you can find in my sig below) I am trying to prevent the need for any other include files. The UDF and examples (plus StringSize) in zip format: ExtMsgBox.zip Courteous comments and constructive criticisms welcome - guess which I prefer! M23
    1 point
  2. 1 point
  3. Here's some code to get you started. You still need to get an API key. Follow the instructions here: https://developers.google.com/youtube/v3/getting-started $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oSC = ObjCreate("ScriptControl") $oSC.language = "JScript" $oSC.Eval("Array.prototype.Item=function(i){return this[i];};") $YT_API_Key = "" $oHTTP.Open("GET", "https://www.googleapis.com/youtube/v3/channels?part=contentDetails&forUsername=LinusTechTips&key="&$YT_API_Key, False) $oHTTP.Send() $oJSON = $oSC.Eval("(" & $oHTTP.responseText & ")") If $oHTTP.status <> 200 Then MsgBox(0, "Error ("&$oHTTP.status&")", "Domain: "&Execute("$oJSON.error.errors.Item(0).domain")&@CRLF&"Reason: "&Execute("$oJSON.error.errors.Item(0).reason")&@CRLF&"Message: "&Execute("$oJSON.error.errors.Item(0).message")) Else $YT_PL_ID = Execute("$oJSON.items.Item(0).contentDetails.relatedPlaylists.uploads") If $YT_PL_ID == "" Then Exit MsgBox(0, "", "Could not get playlist ID") $oHTTP.Open("GET", "https://www.googleapis.com/youtube/v3/playlistItems?part=snippet%2CcontentDetails%2Cstatus&playlistId=UUXuqSBlHAE6Xw-yeJA0Tunw&key="&$YT_API_Key, False) $oHTTP.Send() $oJSON = $oSC.Eval("(" & $oHTTP.responseText & ")") If $oHTTP.status <> 200 Then MsgBox(0, "Error ("&$oHTTP.status&")", "Domain: "&Execute("$oJSON.error.errors.Item(0).domain")&@CRLF&"Reason: "&Execute("$oJSON.error.errors.Item(0).reason")&@CRLF&"Message: "&Execute("$oJSON.error.errors.Item(0).message")) Else MsgBox(0, "", "page 1 of "&(Execute("$oJSON.pageInfo.totalResults")/Execute("$oJSON.pageInfo.resultsPerPage"))) $iLength = Execute("$oJSON.items.length") $iLength = ($iLength=="")?0:$iLength For $i=0 To $iLength $oItem = Execute("$oJSON.items.Item(0)") MsgBox(0, $i&" of "&$iLength, "Title: "&Execute("$oItem.snippet.title")) Next EndIf EndIf
    1 point
  4. My suggestions are for AutoIt. the two suggestions is used with ObjCreate.
    1 point
×
×
  • Create New...