
pinkbits
Members-
Posts
9 -
Joined
-
Last visited
Everything posted by pinkbits
-
Ok, trying to send Ctrl+x to Mount&Blade Warband over and over to prevent getting RSI. It should press Ctrl+x 50 times with a 10ms delay when I press Num0. If I press Num7 it'll exit the script. It works in notepad when I replace ^{x 50} with a test message. I've been over the documentation and pretty sure I've got my syntax ok, it compiles fine without errors, so I'm stuck. Please help! AutoItSetOption("SendKeyDelay", 10) HotKeySet("{NUMPAD0}", "AddExp") HotKeySet("{NUMPAD7}", "ExitScript") Dim $i = 1 Func AddExp() Send("^{x 50}") EndFunc Func ExitScript() Exit EndFunc ;==>Exit While $i = 1 Sleep(1000) WEnd
-
He mentioned that he was comparing it to produkey, not to the sticker on the side of his box.
-
You're a champ. Admins feel free to close this topic. Anyone who looks at this: http://www.autoitscript.com/forum/index.ph...igitalProductId is the solution.
-
I should've mentioned, this needs to be run on a Windows XP machine. I've already tried declaring the array like that and it threw me a syntax error.
-
Hey, I found this and am trying to convert it to AutoIT. So far I've managed to cock it up and am completely lost. What I'm trying to convert: CODERem lookup digital product id from registry Set WshShell = WScript.CreateObject("WScript.Shell") HexBuf = WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId") For l = lBound(HexBuf) to uBound(HexBuf) tmp=tmp & " "& Hex (HexBuf(l)) next WshShell.Popup tmp WshShell.Popup "Found Digital Product Id in registry:-" & _ " " & _ " " & _ " " & tmp StartOffset = 52 EndOffset =67 Dim Digits (24) Digits (0) = "B" : Digits (1) = "C": Digits (2) = "D": Digits (3) = "F": Digits (4) = "G": Digits (5) = "H": Digits (6) = "J": Digits (7) = "K": Digits (8) = "M": Digits (9) = "P": Digits (10) = "Q": Digits (11) = "R": Digits (12) = "T": Digits (13) = "V": Digits (14) = "W": Digits (15) = "X": Digits (16) = "Y": Digits (17) = "2": Digits (18) = "3": Digits (19) = "4": Digits (20) = "6" : Digits (21) = "7" : Digits (22) = "8": Digits (23) = "9" dLen = 29 sLen = 15 Dim HexDigitalPID (15) Dim Des (30) For i = StartOffset to EndOffset HexDigitalPID (i-StartOffset) = HexBuf(i) tmp2=tmp2 & " "& Hex (HexDigitalPID(i-StartOffset)) next WshShell.Popup "Found Digital Product Id in registry:-" & _ " " & _ " " & _ " " & tmp & _ " " & _ " " & _ " " & _ " " & _ "Located the sequence in the digital product ID. Can you see it in the one above (Tip:- 2nd line, 8 in from the left) :- " & _ " " & _ " " & tmp2 KEYSTRING ="" for i=dLen-1 to 0 step -1 if ((i + 1) mod 6) = 0 then Des (i) = "-" KEYSTRING =KEYSTRING & "-" else HN = 0 For N = (sLen -1) to 0 step -1 Value = ( (HN *2^8 ) Or HexDigitalPID (N)) HexDigitalPID (N) = Value \ 24 HN = (Value mod 24) next Des(i) = Digits(HN) KEYSTRING =KEYSTRING & Digits(HN) end if next KEYSTRING2 = StrReverse (KEYSTRING) WScript.Echo "Having finished messing about performing mathmatical stuff" & _ " on your Product ID i have come to the conclusion your XP Key is:- " & _ " " & KEYSTRING2 What I've written so far: CODE #include <array.au3> Global $HexBuffer = StringTrimLeft(String(RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "DigitalProductId")), 2) Global $aASCArray = StringSplit($HexBuffer, '') Global $tmp = '' Global $tmp2 = '' Global $i = '' Global $aDigits[24] $aDigits[0] = "B" $aDigits[1] = "C" $aDigits[2] = "D" $aDigits[3] = "F" $aDigits[4] = "G" $aDigits[5] = "H" $aDigits[6] = "J" $aDigits[7] = "K" $aDigits[8] = "M" $aDigits[9] = "P" $aDigits[10] = "Q" $aDigits[11] = "R" $aDigits[12] = "T" $aDigits[13] = "V" $aDigits[14] = "W" $aDigits[15] = "X" $aDigits[16] = "Y" $aDigits[17] = "2" $aDigits[18] = "3" $aDigits[19] = "4" $aDigits[20] = "6" $aDigits[21] = "7" $aDigits[22] = "8" $aDigits[23] = "9" Global $dLen = 29, $sLen = 15 Global $HexDigitalPID[15] Global $Des[30] Global $iStartOffset = 52 Global $iEndOffset = 67 For $i = 1 To $aASCArray[0] Step 2 $tmp = $tmp & " " & Hex($aASCArray[$i] & $aASCArray[$i + 1],2) Next msgbox(0,'',$tmp) I'm having issues just trying to put the reg key out to the tmp. I've split the reg into $aArray using stringsplit as the vbscript seems to be able to reference a hex like an array. My digitalproductid has an A4 at the start, but when I try adding it into the tmp string, it comes up as 0, it's the only one, all of the others play nice. Also with the $aDigits array I'd like to know if it's possible to declare all of the array contents at the start. I'm going batty... please help!
-
Hey Jarvis, This looks pretty awesome at the moment, haven't tested it yet, but going to. I just finished writing a wrapper for winaudit (http://www.pxserver.com/WinAudit.htm) and Jellybean keyfinder (http://magicaljellybean.com/) to export to a MySQL DB, then found your UDF's. One question I have is I've looked through your UDF functions and haven't noticed one for grabbing CD Keys. Any intention on implementing something like this? I'm not sure if it's possible, I'm trying to find out. If so, I'll be able to scrap my current script and implement the whole thing in Autoit instead of relying on external exe's that I have to package. It'll also mean I can reduce the size of the script from 20MB to just text... hoping <1MB. Thanks mate, Pinkbits
-
Trying to get autoit script to run in group policy
pinkbits replied to pinkbits's topic in AutoIt General Help and Support
Hmm, this is driving me batty. I've done all you mentioned and it's still not working. The event logs atleast are offering some info. It's saying that it can't find the file specified. "Could not execute the following script audit.bat. The system cannot find the file specified." You've been a great help so far... any more ideas? Thanks, Pinkbits -
Trying to get autoit script to run in group policy
pinkbits replied to pinkbits's topic in AutoIt General Help and Support
I managed to get it running, had to apply it to an OU of users to get it to run at startup. Applying it to an OU with the test machine in it didn't work for some reason. Any tips on getting it to run before logon? I'm trying to get it to install the MySQL ODBC driver, but a normal user needs local admin privilieges. If it's before login, it's the SYSTEM account, so it won't have an issue. Thanks, Pinkbits -
Hey all, I'm trying to make a script to wrap around winaudit (www.pxserver.com/WinAudit.htm) and the MyODBC 3.51 driver to audit a computer and dump the data directly to a database. Now I'm trying to deploy this across an organisation via Group Policy. I've got the script running fine on it's own, but if I try running it via Group Policy, it just doesn't run at all. I've setup a GPO associated with a computer (the test box I'm using). I've setup a batch file to run the audit.exe (autoit compiled script) with the command line arguments that it needs. The issue is that it doesn't run at all when using Group Policy, no windows come up, no data appears in the DB server nothing. Any ideas on where I may be going wrong? or anymore info I should supply to help out with the troubleshooting? Thanks Pinkbits