Jump to content

lxxl

Active Members
  • Posts

    25
  • Joined

  • Last visited

Everything posted by lxxl

  1. so just redirect all to flat txt file and deal with it. Now i am working on script to make plink workable via COM port in both way comm. And plink is a better idea then raw putty. simple: $com = InputBox("Select COM","Please provide COM port") $plink = Run("plink.exe -serial COM" & $com & "",@ScriptDir, @SW_HIDE, $STDIN_CHILD + $STDERR_CHILD + $STDOUT_CHILD) while 1     $nMsg = GUIGetMsg()     $msg = StdoutRead($plink)     if @error then ExitLoop     if $msg <> "" Then         ConsoleWrite($msg)             EndIf     if $read Then          StdinWrite($plink,ConsoleRead())         $read=False     EndIf     Switch $nMsg         Case $GUI_EVENT_CLOSE             StdioClose($plink)             ProcessClose("plink")             Exit     EndSwitch WEnd func _read()     $read = True EndFunc raw sample how to push all to console
  2. hey TechCoder, thxx for code now all looks better with ConsoleWrite("Test3 Unquoted Result: " & $Json2 & @CRLF) i can get this in console >"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Users\x\Desktop\code\log.au3" /UserParams +>07:42:25 Starting AutoIt3Wrapper v.2.1.0.8 Environment(Language:0409 Keyboard:00000415 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64) >Running AU3Check (1.54.22.0) from:C:\Program Files (x86)\AutoIt3 +>07:42:25 AU3Check ended.rc:0 >Running:(3.3.8.1):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\x\Desktop\code\log.au3" Test3 Unquoted Result: [{Sysinfo:[{Name:System,Description:System,Type:System,Capabilities:System,Manufacturer:,Properties:[{Name:"User Application Total Space",Description:"The total space for user applications on the device.",Type:DISCRETEMEASUREMENT,Value:"5.42 GB"},{Name:"User Application Percentage Free Space",Description:"The percentage of free space for user applications on the device.",Type:PERCENT,Value:"0.949643"},{Name:"Android Build Id",Description:"The version of Android running on the system",Type:STRING,Value:JDQ39}]}]},{Scripts:[{Script:"123a",Date:"Mar 24, 2014 12:52:31 PM",Result:Failed,Tests:[{Name:APT,Device:"System Memory",Result:Pass}]}]}] +>07:42:25 AutoIT3.exe ended.rc:0 >Exit code: 0 Time: 1.650 so code is working !, move over Local $Json3 = Jsmn_Encode($Data2, $JSMN_PRETTY_PRINT, " ", "\n", "\n", "") print 1:1 txt file and this is good as well but this damm code give me only @CR $resault = Jsmn_Get($Data1, '[0]["Sysinfo"][0]["Properties"][0]["Name"]') ConsoleWrite($resault & @CRLF) with Func Jsmn_Get do you have this one: ; #FUNCTION# =================================================================== ; Name: Jsmn_Get ; Description: Retrieves a value from the scripting.dictionary key specified ; ; Parameter(s): ; $Object Scripting dictionary object ; ; $Key Key for the value you want to retrieve. Follows delimiter based or JSON based format depending on the notation parameter ; ; $Notation ; 0 - Delimiter based - Key1.Key2 ; 1 - JSON format based ["key1"]["key2"] ; ; $Delim If notation = 0 Then this is the delimiter between keys ; ; Requirement(s): JSMN JSON library by Ward. ; ; Return Value(s): ; On Success Returns value from key ; ; On Failure Returns a blank string and an error value. ; @error ; 1 - key does not exist ; 2 - notation syntax error ; @Extended - Only used if notation = 0 ; See StringSplit error codes ; ; Author(s): Ward (modified slightly by SantaRyan to add delimiter notation) ;=============================================================================== Func Jsmn_Get($Object, $Key, $Notation = 0, $Delim = ".") If Not $Key Then Return $Object If IsKeyword($Notation) Then $Notation = 0 Local $Index, $Match, $Ret If $Notation = 0 Then $Match = StringSplit($Key, $Delim, 1) If IsArray($Match) Then $Index = $Match[1] $Key = "" For $i = 2 To $Match[0] $Key &= $Match[$i] & $Delim Next $Key = StringTrimRight($Key, 1) Else Return SetError(2, 0, "") EndIf ElseIf $Notation = 1 Then $Match = StringRegExp($Key, "(^\[([^\]]+)\])", 3) If IsArray($Match) Then $Index = Jsmn_Decode($Match[1]) $Key = StringTrimLeft($Key, StringLen($Match[0])) Else Return SetError(2, 0, "") EndIf EndIf If IsString($Index) And Jsmn_IsObject($Object) And Jsmn_ObjExists($Object, $Index) Then $Ret = Jsmn_Get(Jsmn_ObjGet($Object, $Index), $Key, $Delim) Return SetError(@error, 0, $Ret) ElseIf IsNumber($Index) And IsArray($Object) And $Index >= 0 And $Index < UBound($Object) Then $Ret = Jsmn_Get($Object[$Index], $Key, $Delim) Return SetError(@error, 0, $Ret) Else Return SetError(1, 0, "") EndIf EndFunc ;==>Jsmn_Get ?
  3. Many thx for fast reply TechCoder, good explanation and way to eat it, after add $resault = Jsmn_Get($Obj1, '[0]') i in console popup only @CRLF) so maybe the _filetoarray fail dunno
  4. Guys, i can't get this magic ... here is my JSON array [ { "Sysinfo": [ { "Name": "System", "Description": "System", "Type": "System", "Capabilities": "System", "Manufacturer": "", "Properties": [ { "Name": "User Application Total Space", "Description": "The total space for user applications on the device.", "Type": "DISCRETEMEASUREMENT", "Value": "5.42 GB" }, { "Name": "User Application Percentage Free Space", "Description": "The percentage of free space for user applications on the device.", "Type": "PERCENT", "Value": "0.949643" }, { "Name": "Android Build Id", "Description": "The version of Android running on the system", "Type": "STRING", "Value": "JDQ39" } ] } ] }, { "Scripts": [ { "Script": "123a", "Date": "Mar 24, 2014 12:52:31 PM", "Result": "Failed", "Tests": [ { "Name": "APT", "Device": "System Memory", "Result": "Pass" } ] } ] } ] i try to adapt this: local $Json1_2 _FileReadToArray("TestHistory.txt",$Json1_2) $json1_3 = _ArrayToString($Json1_2,"") $Json2 = StringStripWS($Json1_3, 8) Local $Obj1 = Jsmn_Decode($Json2) $resault = Jsmn_Get($Obj1, '[0]["Sysinfo"]["0"]["7"]["User Application Total Space"]') ConsoleWrite($resault & @CRLF) but all time i cant get resoults, maybe its to complicated for me any help ? thxx
  5. ha so old topic 'D but i will add some own input, yeah i have same black screen issue, but when i unplug camera and plug to other USB port its will works without reboot ... maybe we have to flush USB dev or what ?!
  6. well i did it ;D If Not WinActive("Windows Internet Explorer","") Then WinActivate("Windows Internet Explorer","") WinWaitActive("Windows Internet Explorer","",2) sleep(2000) Send("{space}") and now its works like i need ;D
  7. hi guys i have question regarding the ControlClick("Windows Internet Explorer i have same situation but the popup is only some times jump, so when i dont have popup script will wait will die ... coz no popup ;D any suggestion ? heh ControlSend("Windows Internet Explorer", "", "", "{enter}") to the trick edit 2 nope ... its fail
  8. yeah 100% hit many thx, now i will export it to ini and done ;D thx man
  9. Hi Guys, short desc, simple gui when minimalize to tray i have ctrl+i to bring it back, its ok but how to make possibility for user to choose own shortcut ? well write to ini its not a big problem, only i have no idea how to make input gui and catch the presed key combo ;D Regards
  10. ha many thx guys !! as always great help ! thx
  11. Hi Guys, it is so simple, but i can't figure out this :DD $Input5 = GUICtrlCreateInput("", 8, 312, 121, 21) GUICtrlSetTip(-1, "Gime some") $Label8 = GUICtrlCreateLabel("test input", 8, 336, 116, 20) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $Button5 = GUICtrlCreateButton("Check", 136, 312, 65, 25, BitOR($BS_NOTIFY,$WS_TABSTOP,$WS_VISIBLE,$WS_CHILD)) any ideas how do the trick with enter to go, i mean after input some stuff in input field i want to hit enter to 'check' offcorse i can do TAB-enter or use mouse .. but its will be nice if after inpus some and hit enter its will go forward Thx and regards
  12. hmm and one more question, hows make a custome msg if i type some word with we dont have in ini ? now its will be a Windows err can't wind file
  13. same issue here so i just use xcopy RunWait('xcopy' & " /E /S /Y " & $var3 & " " & $var4 & " ", "x:\", @SW_SHOW)
  14. thx for reply, yep now its works fine without .dll but looks me issue is UNC path ... when i copy all to RAM on x: its will works ... edit: ha its works, i just add copy backup script to x: and exec from x: thx
  15. guys there is any any way to eliminate the user32.dll ? i try to use 'picea892' sample its works fine under xp/vista but under win PE its fail ... i can't select word, file exist ini is ok hmm maybe its some issue with mapped network drive, i have lot of backup.cmd's with i implement in files.ini.
  16. thx evilertoaster for fast reply, yep google always help with one million dollar question's i just curies if we can do from the autoit level thx mate lxxl
  17. Hi Guys, well we can easy read all DMI info from Bios but what about write some any idea about it ? lxxl
  18. ha nice tools, working also on Atom CPU on my AOA150 with Vista Test: Dual/Quad Core optimization Your time: 92.7899 sec π (pi) result: 3.14159265358979 Your CPU: Intel(R) Atom(TM) CPU N270 @ 1.60GHz CPU cores: 2
  19. great work, small questions: 1. can you add option process folder not only a single image ? 2. for folder process maybe add small input box to add some prefix to the target file name like tn_ ) i will try to do it also, because i need this kind of SW to create thumbnails to my web gallery, i have lot of big panoramas and i cant use the hosting server to resize it in the fly on server. also i will be good if we can specify in % custom image size , i will try do add it now regards
  20. great many thx rasim
  21. hi what about read not a partition size but whole HDD size ?
  22. ha always help file help ;DD Do Sleep(99) Until FileExists("w:\") $try = $try + 1 If $try = 100 Then ExitLoop
  23. ahh and one more. its possible to add some extra stop marker to skip DO and go to other section when 20 times try or 1 minute pass Do Sleep(99) Until FileExists("w:\") lxxl
  24. ha its great ) and very easy =]] many thx mate lxxl
  25. Hello hello who can help me to write basic scrit to to job like this : check FileExists on drive R:\test.tx if not wait to connect drive R: after found file do some code i dont have idea how to put it in loop ... Many thx for help lxxl
×
×
  • Create New...