Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/02/2014 in all areas

  1. MrCreatoR

    BlockInputEx UDF!

    Hi, This UDF originaly started in this thread, on the latest post you can find rasim's examples and my initial BlockInputEx udf example. But eventualy i improved the UDF and i thought that it would be better to place it here, in Examples forum. This UDF supports few features that built-in BlockInput() function does not. Here is a quick "features list" if you can call it like this : Block seperately mouse or keyboard input.Block specific keyboard/mouse keys/clicks. [+] Not only hex keys are supported, string keys (such as {ENTER}) is also valid.Block all keyboard/mouse keys *except* specific keys/events.Block keys by CLASS Name (see UDF documentation).Block inputs only for specific window.BlockInput does not re-enables input after pressing Ctrl+Alt+Del.Note: This UDF, same as built-in BlockInput function, can not block Ctrl+Alt+Del, however, it will not re-enable the input. Example #1 (hWindows usage): #include <BlockInputEx.au3> ;================== hWindows usage Example ================== HotKeySet("{ESC}", "_Quit") ;This will trigger an exit (on any window except the window of Notepad). Run(@WindowsDir & "\Notepad.exe", "", @SW_MAXIMIZE) WinWait("[REGEXPCLASS:Notepad.*]") $hNotepad_Wnd = WinGetHandle("[REGEXPCLASS:Notepad.*]") ControlSetText($hNotepad_Wnd, "", "", _ "Now try to input some keys in here..." & @CRLF & _ "Well, that's the idea, you can't, don't you?" & @CRLF & @CRLF & ":)") ;Here we block *All* keyboard keys for specific window (in this case the Notepad's window). _BlockInputEx(3, "", "", $hNotepad_Wnd) ;This is only for testing, so if anything go wrong, the script will exit after 10 seconds. AdlibRegister("_Quit", 10000) While 1 Sleep(100) WEnd Func _Quit() Exit EndFuncExample #2 (CLASSes usage): #include <BlockInputEx.au3> ;================== CLASSes usage Example ================== HotKeySet("{ESC}", "_Quit");This will trigger an exit ;Here we block Numeric keyboard keys, "Test" string (every char in this group), and UP / DOWN arrow keys. _BlockInputEx(3, "", "[:NUMBER:]|[Test]|{UP}|{DOWN}") ;This is only for testing, so if anything go wrong, the script will exit after 10 seconds. AdlibRegister("_Quit", 10000) While 1 Sleep(100) WEnd Func _Quit() Exit EndFuncDownload (In the archive there is 11 nice examples including the two above): BlockInputEx_UDF_1.8.zip BlockInputEx_UDF_1.6.zip _BlockInputEx_UDF_1.5.zip _BlockInputEx_UDF_1.4.zip _BlockInputEx_UDF_1.3.zip _BlockInputEx_UDF_1.2.zip _BlockInputEx_UDF_1.1.zip _BlockInputEx_UDF.zip Enjoy! ================================================================= ChangeLog:
    1 point
  2. It would be great if those browsers allowed the type of scripting access that IE gives to you without any outside programs/plugins being needed. But frankly the IE hate is unwarranted as it's not a bad browser and probably magnitudes beyond FF these days.
    1 point
  3. 1 point
  4. Qwerty212

    BlockInputEx UDF!

    ClipPut writes in the clipboard whatever you want. So you can put ClipPut inside a loop and your script will let you copy (with the mouse or with Control+C with the keyboard) and inmediatly the content of the clilpboard will be changed with empty data. Try this example: #NoTrayIcon ;put this at the top of your script to don't show any tray icon HotKeySet("{ESC}", "_Exit") ;If you press ESC the script will stop While 1 ;the loop ClipPut("") Sleep (20) ; a little sleep to don't use a lot of cpu Wend Func _Exit() ;a little function to exit Exit EndFunc ;==> _Exit() And while your script is running you'll never be able of paste anything. Greets from Barcelona
    1 point
  5. That's easy: long rgrect[24]
    1 point
  6. Qwerty212

    BlockInputEx UDF!

    You can just put this inside a loop: ClipPut("") Greets from Barcelona
    1 point
  7. Hi, Func _DecToBin($d) If $d < 256 Then Return $_aBin256[$d] If $d < 65536 Then Return $_aBin256[BitShift($d,8)] & $_bBin256[BitAND($d, 255)] If $d < 16777216 Then Return $_aBin256[BitShift($d,16)] & $_bBin256[BitAND(BitShift($d,8), 255)] & $_bBin256[BitAND($d, 255)] Return $_aBin256[BitShift($d,24)] & $_bBin256[BitAND(BitShift($d,16), 255)] & $_bBin256[BitAND(BitShift($d,8), 255)] & $_bBin256[BitAND($d, 255)] EndFunc Func _DecToBin($d) Return $d<256?$_aBin256[$d]:$d<65536?$_aBin256[BitShift($d,8)]& _ $_bBin256[BitAND($d,255)]:$d<16777216?$_aBin256[BitShift($d,16) _ ]&$_bBin256[BitAND(BitShift($d,8),255)]&$_bBin256[BitAND($d,255 _ )]:$_aBin256[BitShift($d,24)]&$_bBin256[BitAND(BitShift($d,16), _ 255)]&$_bBin256[BitAND(BitShift($d,8),255)]&$_bBin256[BitAND($d,255)] EndFunc same functionality... Ask yourself, which one is easier to read and debug? Which one NEEDS comments necessarily? For me, there is no question.... Remembers me to the very old discussion about XOR eax,eax vs. MOV eax,0...
    1 point
  8. #include <ButtonConstants.au3> $Submit = GUICtrlCreateButton( "Submit", 220, 47, -1, -1, $BS_DEFPUSHBUTTON) Perhaps.
    1 point
  9. Wouldn't you know it, I think I found what I need, but it's in VB, http://www.cpearson.com/excel/RenameProblems.aspx under the topic Using Code Names could someone translate it to AutoIT for me please, Function GetWorksheetFromCodeName(CodeName As String) As Worksheet Dim WS As Worksheet For Each WS In ThisWorkbook.Worksheets If StrComp(WS.CodeName, CodeName, vbTextCompare) = 0 Then Set GetWorksheetFromCodeName = WS Exit Function End If Next WS End Function Dim WS As Worksheet Set WS = GetWorksheetFromCodeName("Sheet3") Debug.Print WS.Name
    1 point
  10. When it says requires IE5 it means that it requires at least IE5, not that you need IE5 installed on the computer. You'd be really hard pressed to find that version and then to get installed on a current OS would be a tough process if it worked at all. EDIT: Looking at the help file, it clearly says IE5+, so that is already covered in there.
    1 point
  11. A couple of 'step up security' things I did in a php-only project that I'm now porting to AutoIt (the php code required a bit too much 'techie' from the user end, and had other issues, so porting it all over......) AutoIt side security code not yet started - too many other things to do getting the features working, then I'll tie in the security stuff just before public release, so below is just 'concept', though it works well in the php-only version. Also note that this is a bit of 'overkill' for the OP's question, though relates to the subject and other question about a 'Microsoft-ish' code. This is only one way to do it - the more 'mixed' you get, the better! 'Simple' Online Security Check To Create Unlock Code For Only One Machine IMPORTANT: The first thing for you to understand is that NO method of encryption, obfuscation or anything else will guarantee the code won't be cracked. Much like putting a security system in a house, there are various 'layers' you can provide to deter a 'common thief', but a determined pro can still get in. What you are looking to achieve is something that will make a hacker think "it is easier to just buy it than to crack it" - kind of like putting a lock on a glass window (generally, what is the point? though, it will give protection to some level) NEVER put anyone's personal information at risk by including it in your security check! (end of soapbox speech ... Note: this method does not 'require' an ssl connection, but it never hurts! 1. read the details from the machine they are on (there's a nice UDF for that) - UUID, board info, CPU, drive info, etc. (NO PERSONAL DATA!) 2. sprinkle in your feature unlock bits throughout the generated code (this serves to further 'lock the window'), putting the bits scattered around where only you know where they are (do not put them 'every 3rd character' or something - make it more difficult!) One thing you can do here is to take the first (for instance - be creative and use what you like!) character and 'key' off that to further tell where the feature bits are hiding (so, if the first character is '4', you might divide the string by 4, then look at the second character and go that many characters ahead, etc. - yes, it gets confusing - isn't that the point??? But, remember that you only have to do this once - for each side, then the programs talk automatically.) 3. encrypt that data using your own known 'salt' (there's a UDF for that...) - what you will come up with is a string that is something like 200 characters long (recommended to be 'long', but not 'massive' - you want it to transfer quickly) 4. send that string to the php side (similar to the above code) 5. the php side unravels what you put together into a) 'ID' code and 'Features' code (just like you put in) 6. Check the 'ID' code against the SQL server (I suggest you break out all the UUID, disk info, board, etc. and then do a 'percentage match' in case the user changes out a drive or something later) 7. Create a 'valid' string for various features (for instance, if the user has purchased the feature from a website, turn that on and next time they run the security check, that feature will be added) ================== NOW, DO IT IN REVERSE! ============================ 8. Use a DIFFERENT 'salt' and 'secret mix' in the server to create a string to return to the user computer. 9. Unravel that string in the local software and turn on the features. See, 'simple'! (less than 10 steps!)
    1 point
  12. Hi, Welcome to the autoit forum Local $iColor = 0, $aMgp = 0 While 1 $aMgp = MouseGetPos() $iColor = PixelGetColor($aMgp[0], $aMgp[1]) ToolTip("Color: 0x" & Hex($iColor, 6), $aMgp[0] + 10, $aMgp[1] + 10) Sleep(10) WEnd It's the same thing, the only difference is that it's not written on the same base (Decimal = base 10, Hex = base 16). Correct. I would be surprised you haven't IE 5 installed on your computer or it's older than XP. It means it will take the top-left corner of the window as starting coords. Br, FireFox.
    1 point
×
×
  • Create New...