Jump to content

BinaryBrother

Active Members
  • Posts

    902
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by BinaryBrother

  1. Last bump. This project fell through on my priority list, but I'm still curious as to a solution. ^.^
  2. I swear I thought I searched... I guess I quit after I couldn't find #region! Thanks for your information and time, guys!
  3. Where is the documentation for "Directives" (am I getting that right?) located? Like #Region & #forceref. I can't find them in the 3.3.10.0 help file and I've never looked in older versions. I'm finally revising some old code with obsessive organization and started using #Region and discovered that I couldn't find more documentation. So now I'd like to read-up on all of these directives. ^.^
  4. I've already created a bit of code for TV8 and it's pretty handy... Started on a UDF, but never made it. Here's what I have, which isn't much, but it might help someone playing with Tv8. TV8 interfacing was made more difficult, because of the advertisement being on TOP of the TeamViewer remote support window with a similar title, but invisible. So you need to be exact, using Opt("WinTitleMatchMode", 3). Oh, and very nice find on the TV9 API, mlipok. I've been waiting a while for this. @Jfish, You really can't think of one reason why someone would want to easily interface with a free remote support client? A preexisting UDF would make this easier... We all love easy... -Take note, this bit of code fits my personal needs and isn't in correct UDF form. For ex; It exits on error... Func _SetStatus($lStatus) ControlSetText("TeamViewer", '', "[CLASS:Static; INSTANCE:2]", $lStatus) EndFunc ;==>_SetStatus ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GetTV_Info ; Description ...: Will get ID, Password, and Status from TV client. ; Syntax ........: _GetTV_Info($Switch) ; Parameters ....: $lSwitch - 1,2,3 [ID, Pass, Status] ; Return values .: 1 = ID, 2 = Password, 3 = Status, and 0/@error for error. ; Author ........: BinaryBrother ; =============================================================================================================================== Func _GetTV_Info($lSwitch) ; NEED Opt("WinTitleMatchMode", 3) SET! Local $lID, $lPass, $lStatus $lID = 0 $lPass = 0 $lStatus = 0 Select Case $lSwitch = 1 $lID = ControlGetText("TeamViewer", '', "[CLASS:Edit; INSTANCE:1]") If StringLen($lID) <= 0 Then If $gDebug Then _Debug("_GetTV_Info(" & $lSwitch & "): Failed to acquire TV ID.") MsgBox(16, "Error", "Failed to interface with TeamViewer.") Exit Else Return $lID EndIf Case $lSwitch = 2 $lPass = ControlGetText("TeamViewer", '', "[CLASS:Edit; INSTANCE:2]") If StringLen($lID) <= 0 Then If $gDebug Then _Debug("_GetTV_Info(" & $lSwitch & "): Failed to acquire TV password.") MsgBox(16, "Error", "Failed to interface with TeamViewer.") Exit Else Return $lPass EndIf Case $lSwitch = 3 $lStatus = ControlGetText("TeamViewer", '', "[CLASS:Static; INSTANCE:2]") If StringLen($lID) <= 0 Then If $gDebug Then _Debug("_GetTV_Info(" & $lSwitch & "): Failed to acquire TV ID.") MsgBox(16, "Error", "Failed to interface with TeamViewer.") Exit Else Return $lStatus EndIf Case Else If $gDebug Then _Debug("_GetTV_Info(" & $lSwitch & "): Invalid Switch sent to method.") MsgBox(16, "Error", "Invalid switch while interfacing with TV.") EndSelect EndFunc ;==>_GetTV_Info Func _Debug($lInput) If Not @Compiled Then ConsoleWrite($lInput & @CRLF) Else FileWriteLine(@DesktopDir & "\TVS_Debug.txt", $lInput) EndIf EndFunc ;==>_Debug
  5. Smart. Looks like you've headed in the right direction, then.
  6. WinSetState("Example", @SW_HIDE) Rather than changing the transparency, if you change the visibility of the window to hidden, it will remove the taskbar icon. *Just a thought.
  7. You and I might be asking a similar question. /'?do=embed' frameborder='0' data-embedContent>> My problem is spawned as a result of the page headers including "octet/stream". Since I can't change what headers the website is sending, my only resolve is going to be finding a way to make the IE UDF react differently or change the way that the local machine handles that specific type of header, which is not generally a good idea. However, I'm actually looking into these as a possible resolve. [Given that you're stuck on using the IE UDF] http://fiddler2.com/ http://www.charlesproxy.com/ They're proxies so that you may manipulate the information before your program receives it, which isn't what I'm recommending, but it's an idea.
  8. I'm working on a Google Voice UDF for AutoIt and ran into a small problem. I'm using the IE UDF and Google is pushing the JSON data with that "application/octet-stream" header or the "application/force-download" hack, that forces IE to prompt to download the file, rather than displaying it in the render area. I'm expecting to be able to read the JSON data into an AutoIt variable. I see a few options... 1.) Figure out how to do that with the IE UDF. Dale, it's been a bit since I last asked you for help. 2.) Use the WinHTTP stuffs with a custom cookie container of some sort. Should I use the IE UDF or try going a different route?
  9. trancexx has provided me everything that I need for figuring out the rest. As soon as I'm done with this UDF, I'll post it in the examples section. Many thanks, trancexx. Of course, it didn't help when most other JSON documentation says that JSON key/value pairs are normally accessed like, $Array = $JSON.MessagesArray $Var = $Object.Username Or $Username = $JSON.Key("Username") But the method seems to be a bit different with AutoIt.
  10. Of course I trust you, trancexx. That's actually why I changed it from MVP, because of your status not being MVP. *PM Sent with my JSON data.
  11. Ultimately, I'm trying to access the actual message text and relevant information, ex; Who texted me and from which number. That information is in the JSON data. I believe I am after the array of information inside "messageList". http://screencast.com/t/LQlwFbIYJ $test = Jsmn_Decode(FileRead("C:\Users\Owner\Downloads\messages")) $sPlayer = Jsmn_ObjGet($test, "messageList") _ArrayDisplay($sPlayer) This gives me an empty $array[5], but it is correctly sized to fit the data. I'm a lot closer now, though. I wasn't getting any values, before.
  12. Thanks for your helpful reply, trancexx. Using your example, I get the same output as you. However, when I try to get "messages", "messageList", "id", or anything else, it just returns blank. I'm so lost in this JSON abyss. Edit: I just discovered a resource that, I believe, will greatly help me in this project. It has allowed me to visualize JSON data and its structure. Resource: http://jsonviewer.stack.hu/
  13. I'm having as much trouble figuring out how JSON works as I did learning a little SQL. I've tried 4 of the different JSON UDFs around the forums, and I'm on day 3 of trying to figure this out myself... I'm actually beginning to worry that my JSON data is bad. I tried messing with associative arrays. /?do=embed' frameborder='0' data-embedContent>> An old[er]? JSON UDF: /?do=embed#entry1111352'' frameborder='0' data-embedContent>> A new RFC compliant one: '?do=embed' frameborder='0' data-embedContent>> and the "non-strict" one: I'm building a Google Voice UDF for AutoIt and found out how to get JSON return values for everything I need, which I've heard is what I want. Could someone just show me a quick example of iterating through the different JSON values? I was able to get the RFC compliant one to spit out a little info, which had me hopeful, but still stumped. $t = FileRead("C:\Users\Owner\Downloads\download.xml") $test = _JSONDecodeall($t) _ArrayDisplay($test[0]) $test1 = _JSONDecode($t, 'messages') $test2 = _JSONDecode($t, 'JSON_unpack') _ArrayDisplay($test1) _ArrayDisplay($test2) You can grab your own JSON examples from here. http://google.com/voice/request/messages If an old or trusted member, MVP, or that bum trancexx, needs my JSON output, I'll PM it.
  14. That was just a bit deceptive, but that's already been mentioned by an MVP. Maybe you could un-deceptify that link, already?
  15. This thing has gotten pretty dumb, but "hiccups" intelligent conversations at random. Pretty cool script, you caused me to go check out the Cleverbot again. ^.^
  16. Run("C:\Program Files\AutoIt3\Extras\Au3Record\Au3Record.exe") If you have Scite4AutoIt3, but for whatever reason it's just not showing up. It's located at the above location on an x86 machine.
  17. Thanks, guinness. Honestly, I had a brain-fart and couldn't remember if Local would initialize an array, or not. I must have had a small seizure, there.
  18. I forgot to mention that the stringmid/stringlen stuff on the product state comes from these forums. I'll post the resource later today...
  19. @mlipok, Found it! Your AV is out of date? ^.^ find /i "397312" AVstate.txt>nul && set updatestatus=Antivirus up to date! find /i "393216" AVstate.txt>nul && set scanstatus=(On Access scanning [b]disabled[/b]!) find /i "266240" AVstate.txt>nul && set updatestatus=Antivirus up to date! find /i "270336" AVstate.txt>nul && set updatestatus=[color=red][b]Antivirus out of date![/b][/color] find /i "266256" AVstate.txt>nul && set updatestatus=[color=red][b]Antivirus out of date![/b][/color] find /i "262144" AVstate.txt>nul && set updatestatus=Antivirus up to date! find /i "262144" AVstate.txt>nul && set scanstatus=(On Access scanning [b]disabled[/b]!) find /i "262160" AVstate.txt>nul && set updatestatus=[color=red][b]Antivirus out of date![/b][/color] find /i "262160" AVstate.txt>nul && set scanstatus=(On Access scanning [b]disabled[/b]!) find /i "266240" AVstate.txt>nul && set updatestatus=Antivirus up to date! This came from Secret317's SecurityCheck tool.
  20. Good lookin' out, supersonic. @mlipok, $Array[1] is erroneous in your results. It returned the "productState" code rather than "Enabled" or "Disabled". Which indicates that I'm missing something about that productState code. Which doesn't surprise me, we're not really suppose to be using it. ;P Reading more into your output, mlipok, I've found some more information. https://code.google.com/p/driverpacksolution/source/browse/trunk/tools/modules/diagnostics/avScanner.js?r=337 @Marcel789, What OS are you running? What is the current state of UAC? What happens when you "Run as Administrator"? What exactly happens when you run this?
  21. I couldn't find a satisfactory example on the forums, mainly because the interface that I'm using is undocumented and MS wants to keep it that way. This is the first revision of this example. I just wanted to post it while I had time to give other users a better starting point. Only works on Vista+, only gets first instance of AV found. If nobody cleans this up, I'll come back in a few days and post the finished product. Windows XP has an interface [/root/SecurityCenter], but I don't need it. This returns an $Array[4] with the below information. Console: Current AV: Microsoft Security Essentials State: Enabled pathToSignedProductExe: C:\Program Files\Microsoft Security Client\msseces.exe pathToSignedReportingExe: C:\Program Files\Microsoft Security Client\MsMpEng.exe Func _GetAVInfo() Dim $lArray[4] $oWMI = ObjGet("winmgmts:\\localhost\root\SecurityCenter2") $colItems = $oWMI.ExecQuery("Select * from AntiVirusProduct") For $objAntiVirusProduct In $colItems $lArray[0] = $objAntiVirusProduct.displayName $lArray[1] = $objAntiVirusProduct.productstate $lArray[2] = $objAntiVirusProduct.pathToSignedProductExe $lArray[3] = $objAntiVirusProduct.pathToSignedReportingExe Next Dim $AvStatus = Hex($lArray[1]) If StringMid($AvStatus, 5, 2) = "10" Or StringMid($AvStatus, 5, 2) = "11" Then $lArray[1] = "Enabled" ElseIf StringMid($AvStatus, 5, 2) = "00" Or StringMid($AvStatus, 5, 2) = "01" Then $lArray[1] = "Disabled" EndIf Return $lArray EndFunc ;==>_GetAVInfo Resources: http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/bd97d9e6-75c1-4f58-9573-9009df5de19b/security-center-api http://social.msdn.microsoft.com/Forums/en-US/6501b87e-dda4-4838-93c3-244daa355d7c/wmisecuritycenter2-productstate http://screen317.spywareinfoforum.org/ http://neophob.com/2010/03/wmi-query-windows-securitycenter2 Another method to check for Antivirus/Firewall status http://chentiangemalc.wordpress.com/2013/04/09/accessing-windows-security-centre-status-from-powershell/ http://msdn.microsoft.com/en-us/library/bb432509(VS.85).aspx
  22. Thanks, guinness, for bringing everything needed for adding a script to the PC startup to a centralized location. Sorry I've never stopped in to thank you, but I've been using this UDF for a good while. It's nice to have things like these in a central and easily accessible area. Even if the concept is simplistic, you've saved me the work of building the UDF myself. I didn't see you getting the appreciation you deserved, so I had to make a quick post.
  23. I was just about to ask that, BrewManNH. Being as Windows will accept these paths, gracefully, I guess I'll just leave it. ^.^
  24. Yep, you guys are probably right. I never run scripts from root, but I'm working on a project that's working with the root directory of a Network Drive. At first, I thought it was a Network Path bug, but then I tested on my local drive before I posted, hence the C: in the screenshot.
  25. Haha. I'm surprised it's taken me this long to notice that it was returning inconsistent results. What a weird thing to notice after all this time... Trac Submitted:http://www.autoitscript.com/trac/autoit/ticket/2373#ticket
×
×
  • Create New...