Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/13/2013 in all areas

  1. trancexx

    TYPELIB Viewer

    So, what's this? It's a tool-script you would use when you want to know details about specific type libraries. There are some tools available on the net for the job. None written in AutoIt (take this conditionally and search for posts made by doudou). That made me wonder how hard it would be to write one from the scratch. Turned to be very demanding. TypeLib format is not officially or publicly available, at least not to my knowledge. Doing the research I found what's called The Unofficial TypeLib Data Format Specification. Sort of a must read when it comes to understanding the organization of typelib format. Script I'm posting here is written solely upon that document. I must also say that I had to do few modifications of some fields because of found inconsistencies in order to get correct readings. Also I'm doing few deliberate shortcuts mostly because of incomplete description within theircorp's document. What's covered is MSFT type of TypeLib. This obviously means there are more types. Actually one more, called SLTG TypeLib, but this one is very rare (probably less than 1/100 of all TypeLibs). GUI will certainly look familiar if you have run some of the scripts I posted recently. This time it's a wrapper for edit control. Main function is called _TLB_TypelibMSFT(). Everything else inside script serves it. What to learn from it? DllStruct manipulation maybe. But who wants that? Script: TLBViewer.au3 Try AutoItX3.dll or wscript.exe or winhttp.dll or shell32.dll or thousand more to see what this really is. Object(s) some more.
    1 point
  2. KaFu

    Need Example Of Delay

    You're welcome , that's what the forum is for.
    1 point
  3. KaFu

    Need Example Of Delay

    Of course the timer needs to be un-initialized too if mouse is not clicked, had that in the first example but accidentally removed that too ... #include <Misc.au3> Global $hDLL_User32 = DllOpen("user32.dll") ; open DLL only once, makes calls faster Global $iTimer_IsPressed_Mouse, $iTimer_IsPressed_Mouse_Delay = 200 ; initialize global variables While 1 If _IsPressed("01", $hDLL_User32) Then ; if mouse is pressed If Not $iTimer_IsPressed_Mouse Then $iTimer_IsPressed_Mouse = TimerInit() + 10 ; if timer is not initialized, then initialize (current timestamp) + 10 (max delay lost due to last sleep(10)) If $iTimer_IsPressed_Mouse And TimerDiff($iTimer_IsPressed_Mouse) > $iTimer_IsPressed_Mouse_Delay Then ; if timer is initialized and difference is > 200 (global var) then ConsoleWrite("Mouse pressed" & @CRLF) Send("1") $iTimer_IsPressed_Mouse = 0 ; un-initialize timer EndIf Else $iTimer_IsPressed_Mouse = 0 ; un-initialize timer EndIf If _IsPressed("1B", $hDLL_User32) Then ExitLoop ; exit on ESC Sleep(10) WEnd DllClose($hDLL_User32)
    1 point
  4. KaFu

    Need Example Of Delay

    No problem , I love these little brain teasers, here's a commented version. #include <Misc.au3> Global $hDLL_User32 = DllOpen("user32.dll") ; open DLL only once, makes calls faster Global $iTimer_IsPressed_Mouse, $iTimer_IsPressed_Mouse_Delay = 200 ; initialize global variables While 1 If _IsPressed("01", $hDLL_User32) Then ; if mouse is pressed If Not $iTimer_IsPressed_Mouse Then $iTimer_IsPressed_Mouse = TimerInit() + 10 ; if timer is not initialized, then initialize (current timestamp) + 10 (max delay lost due to last sleep(10)) If $iTimer_IsPressed_Mouse And TimerDiff($iTimer_IsPressed_Mouse) > $iTimer_IsPressed_Mouse_Delay Then ; if timer is initialized and difference is > 200 (global var) then ConsoleWrite("Mouse pressed" & @CRLF) Send("1") $iTimer_IsPressed_Mouse = 0 ; un-initialize timer EndIf EndIf If _IsPressed("1B", $hDLL_User32) Then ExitLoop ; exit on ESC Sleep(10) WEnd DllClose($hDLL_User32)
    1 point
  5. KaFu

    Need Example Of Delay

    #include <Misc.au3> Global $hDLL_User32 = DllOpen("user32.dll") Global $iTimer_IsPressed_Mouse, $iTimer_IsPressed_Mouse_Delay = 200 While 1 If _IsPressed("01", $hDLL_User32) Then If Not $iTimer_IsPressed_Mouse Then $iTimer_IsPressed_Mouse = TimerInit() + 10 If $iTimer_IsPressed_Mouse And TimerDiff($iTimer_IsPressed_Mouse) > $iTimer_IsPressed_Mouse_Delay Then ConsoleWrite("Mouse pressed" & @CRLF) Send("1") $iTimer_IsPressed_Mouse = 0 EndIf EndIf If _IsPressed("1B", $hDLL_User32) Then ExitLoop Sleep(10) WEnd DllClose($hDLL_User32)
    1 point
  6. KaFu

    Need Example Of Delay

    I set the timer to 1000 to better demonstrate what's happening... #include <Misc.au3> Global $hDLL_User32 = DllOpen("user32.dll") Global $iTimer_IsPressed_Mouse, $b_IsPressed_Mouse = False, $iTimer_IsPressed_Mouse_Delay = 1000 While 1 If _IsPressed("01", $hDLL_User32) Then If Not $b_IsPressed_Mouse Then If Not $iTimer_IsPressed_Mouse Then $iTimer_IsPressed_Mouse = TimerInit() + 10 If $iTimer_IsPressed_Mouse And TimerDiff($iTimer_IsPressed_Mouse) > $iTimer_IsPressed_Mouse_Delay Then $b_IsPressed_Mouse = True ConsoleWrite("Mouse pressed" & @CRLF) Send("1") EndIf EndIf Else $b_IsPressed_Mouse = False $iTimer_IsPressed_Mouse = 0 EndIf If _IsPressed("1B", $hDLL_User32) Then ExitLoop Sleep(10) WEnd DllClose($hDLL_User32)
    1 point
  7. nyong

    Simple GDI+ Question

    I just want to draw a rect in specific size, then save it to file, the rect must be transparent, only line that have color, can someone point me to the right direction?
    1 point
×
×
  • Create New...