Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/19/2015 in all areas

  1. Here my contribution to the clock fever - nothing special rather a fast hack: Download: AutoIt Eye Clock v1.3.1 build 2015-06-28.7z Left eye = hour, right eye = minutes, pupil light = seconds You can rename the compiled script to *.scr to behave as an screensaver. Furthermore you can copy the *.scr to System32 (x86 system) or SysWOW64 (x64 system) and configure it as a screensaver incl. preview. Original clock: http://www.suck.uk.com/products/eyeclock/ Have fun.
    3 points
  2. This is a visual Crop Tool, Version 1.0.0.5 Load the image in the Crop GUIMove the cross-hair to the upper left corner where to start croppingMark the rectangle with left mouse button, releaseAdjust the position with left mouse, release (right mouse = start over)Press enterImage is saved in same folder, same format, with '_cr' added to file nameAs simple as that. Updated script, Visual Crop UDF 1.0.0.4 examples.au3 Visual Crop UDF 1.0.0.4.au3 (No obscuration of non-selected area) Visual Crop UDF 1.0.0.5.au3 (with obscuration) Ver 1.0.0.1 Avoid trespassing the edge of the GUI while selecting the crop area.Ver 1.0.0.4 Mark crop area in any directionResizing Corner grabbers (use with Ctrl Left Mouse button)Mouse cursor changes over move and resizing corner grabbersRedraw when left mouse clicking outside of crop area (restart crop), right Mouse click, same result.Magnifier de-/selectable with Ctrl-M or F2. (original function by Melba23) Note: without image ratio: Magnifier remains visible till the crop area has been marked with image ratio: Magnifier is only visible until the rectangle appears, first corner has been marked. Ver 1.0.0.5 Obscure non crop area, did some hard thinking and found my way... Missing still: ?Enjoy GreenCan Related:
    1 point
  3. PCI, Of course the numbers are not Mod 10 - you did not ask for them to be so. The code produces a Mod 10 checksum and adds it to the end of the random value - as this checksum will vary between 0 and 9, the final digit will also vary between those values. M23
    1 point
  4. UEZ

    _MemoryRead returning empty

    If it is not game related then it should be easy to answer the purpose of using NomadMemory.
    1 point
  5. That's one possible way to solve the problem ...
    1 point
  6. ​This would result in something like this.... (Picasso clock) P.S. @UEZ Nice clock of course!
    1 point
  7. Eyes at the top, normal (analogue) clock for nose, 1 and 0's for the (seconds) teeth, for a complete clock "face".
    1 point
  8. You need _Excel_Open to start up Excel or to comnect to a running instance You then need _Excel_BookOpen to open an existing workbook Then use _Excel_RangeWrite to write data to the open workbook. You will find examples for each command in the help file.
    1 point
  9. Hi, I finally figured out what was the problem it was the power plan settings which disabled sleep wake up timers. http://windows.microsoft.com/en-ph/windows7/sleep-and-hibernation-frequently-asked-questions Thanks hope this will be useful for anyone having the same problems.
    1 point
  10. #include <MsgBoxConstants.au3> MsgBox($MB_SYSTEMMODAL, "", "Check if _Func1 is a function or not." & @CRLF & _ @CRLF & _ "This will return 1 as the function is user defined: " & IsFunc(_Func1)) Func _Func1() EndFunc ;==>_Func1
    1 point
  11. Jon

    Forum Upgrade Status

    I've got an implementation of the code collapse/expand/popup buttons working. This was the main thing missing from the new forum in my mind. ; ; Checks the documentation for various errors #Region Includes #include "include\OutputLib.au3" #EndRegion Includes #Region Global Variables #EndRegion Global Variables #Region Main body of code Global $g_nExitCode = Main() Exit $g_nExitCode #EndRegion Main body of code #Region Main() ; =================================================================== ; Main() ; ; The main program body. ; Parameters: ; None. ; Returns: ; None. ; =================================================================== Func Main() Local $nReturn = 0 ; Create the output window and initial message. _OutputWindowCreate() _OutputProgressWrite("==== Output for " & StringTrimRight(@ScriptName, StringLen(".exe")) & " (Help Check) ====" & @CRLF) _OutputProgressWrite("Checking... ") ; The path to the Help Check directory. Local Const $sPath = @ScriptDir & "\include\Help Check" ; The path to the Help Check script. Local Const $sScript = $sPath & "\Help File Check.au3" ; Build the full command to execute. Local Const $sCmd = '"' & @AutoItExe & '" /AutoIt3ExecuteScript "' & $sScript & '"' ; Run the script. $nReturn = _RunWaitForwardOutput("_OutputBuildWrite", $sCmd, $sPath) ; Check the return value. If $nReturn Then _OutputProgressWrite("failed (" & $nReturn & ")." & @CRLF) Else _OutputProgressWrite("complete." & @CRLF) EndIf ; Write closing message and wait for close (if applicable). _OutputProgressWrite("Finished." & @CRLF & @CRLF) ; Two CRLF's in case of chained output. _OutputWaitClosed($nReturn) ; Return the value. Return $nReturn EndFunc ;==>Main #EndRegion Main()
    1 point
  12. This little example, you can build a function in AutoIt, the function have options and this options is send to PHP script. The PHP script proccess all options, and returns to AutoIt. Its simple and still development, but is useful. You can use xampp/wamp. Br, Luigi AutoIt script: #include-once #include <JSMN.au3> ; https://github.com/ez2sugul/stopwatch_client/blob/master/JSMN.au3 #include <object_dump.au3> arpc_url("http://localhost", "arpc/arpc.php") Local $sum = arpc_sum(20, 30) ConsoleWrite("$sum[" & $sum & "]" & @LF) Local $greetings = arpc_greetings() ConsoleWrite("$greetings[" & $greetings & "]" & @LF) Func arpc_sum($iNumber1, $iNumber2) Local $oo = ObjCreate($SD) $oo.Add("method", "sum") $oo.Add("number1", $iNumber1) $oo.Add("number2", $iNumber2) Local $oRet = arpc($oo) If @error Then Else Local $json = Jsmn_Decode($oRet) If Not $json.Exists("method") Then Return SetError(1, 0, "#unknow $json") Switch $json.Item("method") Case "@done" Return $json.Item("result") Case "@error" Return "@error." & $json.Item("result") EndSwitch EndIf EndFunc ;==>arpc_sum Func arpc_greetings() Local $oo = ObjCreate($SD) $oo.Add("method", "greetings") $oo.Add("client_name", @ComputerName) Local $return = arpc($oo) If @error Then Else EndIf EndFunc ;==>arpc_sum Func arpc_url($sHost = "", $sPage = "") If Not IsDeclared("oARPC") Then Global $oARPC = ObjCreate($SD) If IsDictionary($oARPC) Then $oARPC = ObjCreate($SD) __arpc_set("host", $sHost) __arpc_set("page", $sPage) __arpc_set("url", $sHost & "/" & $sPage) __arpc_set("version", "0.0.0.1") EndFunc ;==>arpc_url Func __arpc_set($key, $value) If $oARPC.Exists($key) Then $oARPC.Item($key) = $value Else $oARPC.Add($key, $value) EndIf EndFunc ;==>__arpc_set Func arpc($oo = "") Local $iStatusCode, $sReceived Static $sCookie = Cookie() ;~ If $DEBUG Then ConsoleWrite(@TAB & "> " & $sAddress & @LF) Local $oHttp = ObjCreate("WinHttp.WinHttpRequest.5.1") If @error Then Return SetError(1, 0, 0) $oHttp.Open("POST", $oARPC.Item("url"), False) $oHttp.setRequestHeader("User-Agent", "ARPC-AutoIt") $oHttp.setRequestHeader("arpc_version", $oARPC.Item("version")) $oHttp.setRequestHeader("Connection", "Keep-Alive") If $sCookie Then $oHttp.setRequestHeader("Cookie", $sCookie) $oHttp.setRequestHeader("Referer", $oARPC.Item("url")) Local $json = Jsmn_Encode_Compact($oo) ConsoleWrite("--> " & $json & @LF) $oHttp.Send(StringToBinary($json, 4)) $oHttp.WaitForResponse() Local $oAllHeaders = $oHttp.GetAllResponseHeaders() $sReceived = $oHttp.ResponseText $iStatusCode = $oHttp.Status If Not $sCookie Then $sCookie = $oHttp.GetResponseHeader("Set-Cookie") $oHttp = 0 If $iStatusCode == 200 Then Cookie($sCookie) ;ConsoleWrite("$oAllHeaders--------------------" & @LF & $oAllHeaders & "$oAllHeaders--------------------" & @LF) ConsoleWrite("<-- " & $sReceived & @LF) Return $sReceived Else ConsoleWrite("<-- @error" & @LF) Return SetError(1, 0, 0) EndIf EndFunc ;==>arpc Func Cookie($sInput = False) ;~ http://brugbart.com/setting-http-request-headers-autoit Static $sCookie If $sInput Then $sCookie = $sInput Return $sCookie EndFunc ;==>Cookie PHP Server <?php class arpc{ private $sRaw; private $sJson; private $oReturn; private $version; private $aHeaders; function __construct(){ $this->arpc_version = "0.0.0.1"; $this->oReturn = new stdClass(); $this->oFunctions = new stdClass(); $this->oFunctions->sum = array("number1", "number2"); $this->oFunctions->greetings = array("client_name"); $this->aHeaders = getallheaders(); if(!isset($this->aHeaders["arpc_version"])){ $this->oReturn->method = "@error"; $this->oReturn->result = "@version"; die(); } if(!isset($this->aHeaders["User-Agent"]) || ($this->aHeaders["User-Agent"] != "ARPC-AutoIt" ) ){ $this->oReturn->method = "@error"; $this->oReturn->result = "@user"; die(); } if(isset($HTTP_RAW_POST_DATA)){ $sRaw = $HTTP_RAW_POST_DATA; }else{ $sRaw = file_get_contents("php://input"); } if(!$sRaw){ $this->oReturn->method = "@error"; $this->oReturn->result = "@sRaw"; die(); } if(($this->sJson = json_decode($sRaw)) != True){ $this->oReturn->method = "@error"; $this->oReturn->result = "@json"; die(); } if(property_exists($this->oFunctions, $this->sJson->method) && method_exists("arpc", $this->sJson->method) ){ $method = $this->sJson->method; unset($this->sJson->method); $arr = $array = get_object_vars($this->sJson); $try = self::check_methods($this->oFunctions->$method, $arr); if($try){ $this->oReturn->method = "@done"; $this->oReturn->result = call_user_func_array("self::{$method}", $arr); }else{ $this->oReturn->method = "@error"; $this->oReturn->result = "@properties"; die(); } }else{ $this->oReturn->method = "@error"; $this->oReturn->result = "@unknow method"; die(); } } function check_methods($aa, $bb){ $arr = array(); foreach($bb as $key => $value){ $arr[] = $key; } $aDiff = array_diff($aa, $arr); if(count($aDiff)){ return False; }else{ return True; } } function __destruct(){ self::output(); } private function output(){ header("Content-Type: application/json; charset=utf-8"); header("version", $this->version); echo json_encode($this->oReturn); die(); } private function sum($number1, $number2){ return (int) $number1 + (int) $number2; } private function greetings($client_name){ return "Welcome {$client_name}!"; } } $arpc = new arpc(); object_dump.au3 #include-once #include <String.au3> Func dump($oo, $key = "", $iIdent = 0) ;~ Local $sString = dump_str($oo, $key, $iIdent) ConsoleWrite(dump_str($oo, $key, $iIdent) & @LF) ;~ Local $iTab = 4 ;~ Local $sKeys ;~ If IsDictionary($oo) Then ;~ $sKeys = $oo.Keys ;~ For $each In $sKeys ;~ If IsDictionary($oo.Item($each)) Or IsArray($oo.Item($each)) Then ;~ ConsoleWrite(($iIdent == 0 ? "" : (_StringRepeat(" ", $iIdent))) & $each & "{" & @LF) ;~ dump($oo.Item($each), ($key == "" ? "" : $key & ".") & $each, $iTab + $iIdent) ;~ ConsoleWrite(($iIdent == 0 ? "" : (_StringRepeat(" ", $iIdent))) & "}" & @LF) ;~ Else ;~ ConsoleWrite(($iIdent == 0 ? "" : (_StringRepeat(" ", $iIdent))) & ($key == "" ? "" : $key & ".") & $each & " = " & $oo.Item($each) & @LF) ;~ EndIf ;~ Next ;~ Else ;~ If IsArray($oo) Then ;~ Switch UBound($oo, 0) ;~ Case 1 ;~ For $ii = 0 To UBound($oo, 1) - 1 ;~ If IsDictionary($oo[$ii]) Or IsArray($oo[$ii]) Then ;~ dump($oo[$ii], $key & "[" & $ii & "]", $iTab + $iIdent) ;~ Else ;~ ConsoleWrite(($iIdent == 0 ? "" : (_StringRepeat(" ", $iIdent))) & ($key == "" ? "" : $key & "[") & $ii & "] = " & $oo[$ii] & @LF) ;~ EndIf ;~ Next ;~ Case 2 ;~ For $ii = 0 To UBound($oo, 1) - 1 ;~ For $jj = 0 To UBound($oo, 2) - 1 ;~ If IsDictionary($oo[$ii][$jj]) Or IsArray($oo[$ii][$jj]) Then ;~ dump($oo[$ii][$jj], $key & "[" & $ii & "][" & $jj & "]", $iTab + $iIdent) ;~ Else ;~ ConsoleWrite(($iIdent == 0 ? "" : (_StringRepeat(" ", $iIdent))) & ($key == "" ? "" : $key & "[") & $ii & "][" & $jj & "] = " & $oo[$ii][$jj] & @LF) ;~ EndIf ;~ Next ;~ Next ;~ EndSwitch ;~ Else ;~ EndIf ;~ EndIf EndFunc ;==>dump Func dump_str($oo, $key = "", $iIdent = 0) Local $iTab = 4 Local $sKeys Local $sString = "" If IsDictionary($oo) Then $sKeys = $oo.Keys For $each In $sKeys If IsDictionary($oo.Item($each)) Or IsArray($oo.Item($each)) Then $sString &= (($iIdent == 0 ? "" : (_StringRepeat(" ", $iIdent))) & $each & "{" & @LF) $sString &= dump_str($oo.Item($each), ($key == "" ? "" : $key & ".") & $each, $iTab + $iIdent) $sString &= (($iIdent == 0 ? "" : (_StringRepeat(" ", $iIdent))) & "}" & @LF) Else $sString &= (($iIdent == 0 ? "" : (_StringRepeat(" ", $iIdent))) & ($key == "" ? "" : $key & ".") & $each & " = " & $oo.Item($each) & @LF) EndIf Next Else If IsArray($oo) Then Switch UBound($oo, 0) Case 1 For $ii = 0 To UBound($oo, 1) - 1 If IsDictionary($oo[$ii]) Or IsArray($oo[$ii]) Then $sString &= dump_str($oo[$ii], $key & "[" & $ii & "]", $iTab + $iIdent) Else $sString &= (($iIdent == 0 ? "" : (_StringRepeat(" ", $iIdent))) & ($key == "" ? "" : $key & "[") & $ii & "] = " & $oo[$ii] & @LF) EndIf Next Case 2 For $ii = 0 To UBound($oo, 1) - 1 For $jj = 0 To UBound($oo, 2) - 1 If IsDictionary($oo[$ii][$jj]) Or IsArray($oo[$ii][$jj]) Then $sString &= dump_str($oo[$ii][$jj], $key & "[" & $ii & "][" & $jj & "]", $iTab + $iIdent) Else $sString &= (($iIdent == 0 ? "" : (_StringRepeat(" ", $iIdent))) & ($key == "" ? "" : $key & "[") & $ii & "][" & $jj & "] = " & $oo[$ii][$jj] & @LF) EndIf Next Next EndSwitch Else EndIf EndIf Return $sString EndFunc ;==>dump_str Func IsDictionary($oo = Null) If Not IsObj($oo) Or Not (ObjName($oo, 2) == "Scripting.Dictionary") Then Return 0 ;~ If Not (ObjName($oo, 2) == "Scripting.Dictionary") Then Return 0 Return 1 EndFunc ;==>IsDictionary
    1 point
  13. GUIMish

    GUIEditEx UDF

    This library contains "Edit" with color syntax au3, zoom, marker, and etc. Library created in version Autoit: 3.3.12.0 Examples in the archive. Available functions Download
    1 point
  14. Jos

    E-Mail

    That is because it is not part of the standard UDF's supplied with AutoIt3. Search for it in the Examples forum will do miracles.
    1 point
×
×
  • Create New...