Jump to content

tes5884

Active Members
  • Posts

    81
  • Joined

  • Last visited

About tes5884

  • Birthday September 21

Profile Information

  • Location
    Rockland County, NY
  • WWW
    http://www.tspitz.com
  • Interests
    Music
    Linux
    Android
    Technology.....

tes5884's Achievements

Wayfarer

Wayfarer (2/7)

2

Reputation

  1. That worked. Thank you!
  2. I am trying to use this UDF and keep getting stuck. This is the code I have: $json1 = '{"coord":{"lon":-0.13,"lat":51.51},"sys":{"type":1,"id":5091,"message":0.2133,"country":"GB","sunrise":1406607636,"sunset":1406663600},"weather":[{"id":800,"main":"Clear","description":"Sky is Clear","icon":"01n"}],"base":"cmc stations","main":{"temp":295.47,"pressure":1014,"humidity":47,"temp_min":293.15,"temp_max":298.15},"wind":{"speed":5.1,"deg":340},"clouds":{"all":0},"dt":1406664059,"id":2643743,"name":"London","cod":200}' $jsmn = Jsmn_Decode($json1) $object = Jsmn_ObjGet($jsmn, "coord") $keys = Jsmn_ObjGetKeys($object) _ArrayDisplay($keys) At this point I get an array with "lun" and "lat". How would I actually get the value of these 2 keys? Additionally, why if I try to get the "weather" key, am I not getting any return? Thank you I really appreciate the hard work you guys put into developing these UDF's.
  3. Is there a way to create an IF loop comparing multiple values in a single statement? Something like below. IF $x <> "1" OR "2" OR "3" Then ConsoleWrite("Success") EndIf Thanks!
  4. Hi Guys, I'm trying to do a HTTP POST which would change a setting on my server. (details here, enable recordings etc.) When I use the full URL via a browser it works fine, when I use the script below, it fails. #include <http.au3> $Host = "192.168.20.5" $Port = "5000" $File = "/ivr/PbxAPI.aspx" $PostData = "func=upd_ext&extnum=3888&pwd=123456!&record_calls=0" $Socket = _HTTPConnect($Host, $Port) _HTTPPost($Host, $File, $Socket, _HTTPEncodeString($PostData)) _HTTPClose($Socket) I assume I'm doing something wrong, I can't figure out what :-) Any suggestions are appreciated. Thanks!!
  5. I don't know what DOM objects are, hence my confusion. My apologies..
  6. Scite doesnt like your StringRexExp...
  7. Thanks man! but I'm trying to learn how to use StringRegExp properly... Also, I'm trying to just get back the digits, no alpha. Thanks
  8. example RSS source would be: http://www.filehippo.com/download_adobe_reader/rss I want to retrieve the new version number, compare to the list of current versions, if it doesnt exist here notify me about new version, otherwise exit.
  9. Hi Guys, I'm trying to write a script to check a rss feed if there is an update to Adobe or Firezilla. Trouble is, I cant wrap my brain around StringRegExp, how do I get only the version number so I can compare to my current version and see if it is up to date? Thanks! #include <IE.au3> #include <Array.au3> #include <CSV.au3> $lst = "sources.csv" $csv = _ParseCSV($lst, "", "", 1) For $i = 0 To UBound($csv, 1) - 1 InetGet($csv[$i][0], "temp.xml") $1 = FileRead("temp.xml") $2 = StringRegExp($1, '', 3) If FileExists($csv[$i][1] & ".txt") Then If $2[2] > FileReadLine($csv[$i][1] & ".txt", -1) Then $rslt = MsgBox(4, "", "Updates available! Do you want to be reminded again?") If $rslt = 7 Then FileWriteLine($csv[$i][1] & ".txt", $2[2]) EndIf EndIf Else FileWrite($csv[$i][1] & ".txt", $2[2]) EndIf FileDelete("temp.xml") Next Exit
  10. Fixed. It works perfectly thanks..
  11. @Skruge it worked! Thank you all for helping! This is the working edition if anyone else has the same problem.. #include <Constants.au3> #include <Array.au3> #include <CSV.au3> $pid = Run("wmic bios get serialnumber", "", "", $STDERR_CHILD + $STDOUT_CHILD) ProcessWaitClose($pid) $std = StdoutRead($pid) $tag = StringRight(StringStripWS($std, 8), 7) Local $dpt = "DPT" Local $nPcName = $dpt & "-" & $tag $oPcName = _ParseCSV("test.csv") _ArrayDisplay($oPcName) For $i = 0 To UBound($oPcName, 1) ConsoleWrite("$i = " & $i & @CRLF) Run(@ComSpec & " /k netdom renamecomputer " & $oPcName[$i][0] & " /NewName:" & $nPcName & " /Force") Next
  12. This is the exact and entire script at this time. #include <Constants.au3> #include <Array.au3> #include <CSV.au3> $pid = Run("wmic bios get serialnumber", "", "", $STDERR_CHILD + $STDOUT_CHILD) ProcessWaitClose($pid) $std = StdoutRead($pid) $tag = StringRight(StringStripWS($std, 8), 7) Local $dpt = "DPT" Local $nPcName = $dpt & "-" & $tag $oPcName = _ParseCSV("test.csv") _ArrayDisplay($oPcName) For $i = 0 To UBound($oPcName) -1 ConsoleWrite("$i = " & $i & @CRLF) Run(@ComSpec & " /k netdom renamecomputer " & $oPcName[$i] & " /NewName:" & $nPcName & " /Force") Next
  13. That worked! $i = 0 $i = 1 Now why am I getting an error when I try to get the output of $oPcName[$i]
  14. Already did that per BrewManNH
×
×
  • Create New...