Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/23/2023 in all areas

  1. https://www.oreilly.com/library/view/vbscript-in-a/0596004885/re109.html https://www.autohotkey.com/docs/v1/lib/Func.htm ; #FUNCTION# ============================================================================= ; Name ..........: __GetRef ; Syntax ........: __GetRef($o_FunName = '', Const $p1 = Default, Const $p2 = Default, Const $p3 = Default, Const $p4 = Default, _ ; Const $p5 = Default, Const $p6 = Default) ; Parameters ....: $o_FunName - Callbacks Function Name ; $p1 - [optional] ; $p2 - [optional] ; $p3 - [optional] ; $p4 - [optional] ; $p5 - [optional] ; $p6 - [optional] ; Return values .: Object ; Author ........: jugador ; ======================================================================================== Example 1 Example 2 Example 3 Example 4 Example 5 #include "GetRef UDF2.au3" __ExampleA() Func __ExampleA() Local $TestB = __GetRef('MsgFunction', 'PrintMsg') $TestB() EndFunc Func PrintMsg($friend) ConsoleWrite(2 & @crlf) ConsoleWrite("How " & $friend & @crlf) ConsoleWrite(3 & @crlf) EndFunc Func MsgFunction($myFunc) ConsoleWrite(1 & @crlf) Call($myFunc, "are You?") ConsoleWrite(4 & @crlf) EndFunc Example 5 output: 1 2 How are You? 3 4 GetRef UDF: GetRef UDF2.au3 GetRef UDF3.au3
    2 points
  2. https://developers.google.com/chart/interactive/docs/quick_start I took a look, and I did it so to speak , a first approximation _GoogleChart($aData [, $Title = "" [, $iHorAxisCol = 0 [, $sChartType = "AreaChart" [, $sTitleColor = "#333" [, $Width = 854 [, $Height = 480 [, $Execute = True]]]]]]]) GoogleCharts.au3 ; https://www.autoitscript.com/forum/topic/210868-make-a-html-chart-with-google-charts/ ;---------------------------------------------------------------------------------------- ; Title...........: GoogleCharts.au3 ; Description.....: Make a html chart with 'Google Charts' - ChartType: AreaChart; ColumnChart ; AutoIt Version..: 3.3.16.1 Author: ioa747 ; Note ...........: https://developers.google.com/chart/interactive/docs/quick_start ;---------------------------------------------------------------------------------------- #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #include <Array.au3> Example() ;---------------------------------------------------------------------------------------- Func Example() Local $Array[][] = [ _ ["Month", "Bears", "Dolphins", "Whales"], _ ["jan", 8, 150, 80], _ ["feb", 54, 77, 54], _ ["mar", 93, 32, 10], _ ["apr", 116, 11, 76], _ ["may", 137, 6, 93], _ ["jun", 184, 1, 72]] ;~ _ArrayDisplay($Array) Local $sSTR = _GoogleChart($Array, "Wild life", 0, "ColumnChart") ConsoleWrite("********************************************************************************" & @CRLF & $sSTR & @CRLF) Sleep(3000) _GoogleChart($Array, "Wild life", 0, "AreaChart") EndFunc ;==>Example ;---------------------------------------------------------------------------------------- Func _GoogleChart(ByRef $aData, $Title = "", $iHorAxisCol = 0, $sChartType = "AreaChart", $sTitleColor = "#333", $Width = 854, $Height = 480, $Execute = True) Local $sChartFile = @ScriptDir & "\Chart.html" Local $sHTML = "" $sHTML &= "<html>" & @CRLF $sHTML &= " <head>" & @CRLF $sHTML &= " <script type=""text/javascript"" src=""https://www.gstatic.com/charts/loader.js""></script>" & @CRLF $sHTML &= " <script type=""text/javascript"">" & @CRLF $sHTML &= " google.charts.load('current', {'packages':['corechart']});" & @CRLF $sHTML &= " google.charts.setOnLoadCallback(drawChart);" & @CRLF $sHTML &= "" & @CRLF $sHTML &= " function drawChart() {" & @CRLF $sHTML &= " var data = google.visualization.arrayToDataTable([" & @CRLF Local $ByPass = "" For $R = 0 To UBound($aData) - 1 Local $sTxt = "" For $C = 0 To UBound($aData, 2) - 1 If $R = 0 Then ; in first row all is string $sTxt &= "'" & $aData[$R][$C] & "', " Else ; if Column = $iHorAxisCol is string If $C = $iHorAxisCol Then $sTxt &= "'" & $aData[$R][$C] & "', " Else $sTxt &= $aData[$R][$C] & ", " EndIf EndIf Next $sTxt = StringTrimRight($sTxt, 2) $sTxt = " [" & $sTxt & "]," & @CRLF $ByPass &= $sTxt Next $ByPass = StringTrimRight($ByPass, 3) ;ConsoleWrite("$ByPass:" & @CRLF & $ByPass & @CRLF) $sHTML &= $ByPass & @CRLF $sHTML &= " ]);" & @CRLF $sHTML &= "" & @CRLF $sHTML &= " var options = {" & @CRLF $ByPass = " title: '" & $Title & "'," $sHTML &= $ByPass & @CRLF $ByPass = " hAxis: {title: '" & $aData[0][$iHorAxisCol] & "', titleTextStyle: {color: '" & $sTitleColor & "'}}," $sHTML &= $ByPass & @CRLF $sHTML &= " vAxis: {minValue: 0}" & @CRLF $sHTML &= " };" & @CRLF $sHTML &= "" & @CRLF $ByPass = " var chart = new google.visualization." & $sChartType & "(document.getElementById('chart_div'));" $sHTML &= $ByPass & @CRLF $sHTML &= " chart.draw(data, options);" & @CRLF $sHTML &= " }" & @CRLF $sHTML &= " </script>" & @CRLF $sHTML &= " </head>" & @CRLF $sHTML &= " <body>" & @CRLF $ByPass = " <div id=""chart_div"" style=""width: " & $Width & "px; height: " & $Height & "px;""></div>" $sHTML &= $ByPass & @CRLF $sHTML &= " </body>" & @CRLF $sHTML &= "</html>" & @CRLF $sHTML &= "" & @CRLF Local $hFileOpen = FileOpen($sChartFile, 266) If $hFileOpen = -1 Then Return SetError(1, 0, "") EndIf FileWrite($hFileOpen, $sHTML) FileClose($hFileOpen) If $Execute = True Then ShellExecute($sChartFile) Return $sHTML EndFunc ;==>_GoogleChart ;---------------------------------------------------------------------------------------- Please, every comment is appreciated! leave your comments and experiences here! Thank you very much
    1 point
  3. Just uploaded some lua updates to SciTE_changes_Dynamic_Includes_LUA.zip: autocomplete.au3.min.length should properly work again dropdown generated again when backspace is pressed. backspace also working on multi select, but only the active cursor pos will get the autocomplete result. the re-lex is now move into a function and will only do more lines when multiselect is active, else it will only do the current line as in the past.
    1 point
  4. I guess this is how you would read 3 lines out of a file into the clipboard and then paste it. local $file="example.txt" local $tmp="" For $i = 1 to 3 Step 1 $tmp=$tmp & FileReadLine($file, $i) & @crlf Next Clipput($tmp) Send("^v")
    1 point
  5. what do you want to do?
    1 point
  6. Please update to the latest WinHTTP source available here and then redo the tests.
    1 point
×
×
  • Create New...