Jump to content

WM_COPYDATA return


Recommended Posts

3 minutes ago, Danyfirex said:

compare if they have same value

Yes they are the same, i don't know why i didn't thought about that in the first place.

Thanks.

 

4 minutes ago, Danyfirex said:

maybe I can do it in my dreams meanwhile

It's always good to dream! But soon everything will be better! 🍻

Edited by MrCreatoR

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Link to comment
Share on other sites

Link to comment
Share on other sites

@Danyfirex, this look awesome, very cool.

The _WM_COPYDATA is used as an event, to trigger the read memory.
Is there a way, that is not too far out of your way, to trigger the memory read without using a GUI for it ?, as a memory write that triggers a memory read, or simple in the main loop read, that is not heavy for AutoIt ?

I know this is not the OP question but, can't help to wonder since is all a memory read/write and the GUI is just for the event handler. No GUI dependency would be like, WOW.

Thanks.

Edited by argumentum
grammar :)

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

5 minutes ago, Bilgus said:

You still need a message loop

...the script needs a loop, OnEvent or not. So, a loop is not a big deal.

 

6 minutes ago, Bilgus said:

You could use the internal autoit window

actually no. I can not  GUIRegisterMsg() it.

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

nah you need to use SetWindowSubclass

AutoItWinSetTitle(@ScriptName)
$hAutoitInternal = WinGetHandle(@ScriptName)

$hMsgProc = DllCallbackRegister(NewMessage, 'lresult', 'hwnd;uint;wparam;lparam;uint_ptr;dword_ptr')
_WinAPI_SetWindowSubclass($hAutoitInternal, DllCallbackGetPtr($hMsgProc), $iMyID)

Func NewMessage($hWnd, $iMsg, $wParam, $lParam, $iId, $pData)
    #forceref $iID, $pData
    Return _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam)
EndFunc

Func _Exit()
    If $hMsgProc Then
        _WinAPI_RemoveWindowSubclass($hAutoitInternal, DllCallbackGetPtr($hMsgProc), $iMyID)
        DllCallbackFree($g_hMsgProc)
    EndIf

 

Edited by Bilgus
Add #forceref $iID, $pData Return _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam)
Link to comment
Share on other sites

Quote

...the script needs a loop, OnEvent or not. So, a loop is not a big deal.

When you do your own message loop it has to be pumped in a timely manner so it sometimes becomes a big deal

at least with the subclass you can still have AutoIt take care of the minute 

Link to comment
Share on other sites

2 minutes ago, Bilgus said:

When you do your own message loop it has to be pumped in a timely manner so it sometimes becomes a big deal ...

...all this is way above my pay grade !.
I would have to build some coding experience to comfortably code with sub-classing.
Thanks for the coding class :) 

I'll give a try in one of those moments when I'm bored.
It'll be good to expand my knowing to the 
point that this technique is in my arsenal :D  

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

Using COM for IPC and triggering events without a loop but via ObjEvent() could be a good method too.

Edit: Or do something like this in a loop and look for changes / reset the var when read.

 

Edited by KaFu
Link to comment
Share on other sites

looks like a solution to my question :) 
...it does crash running x64 :( 

@trancexx, ..it been about a decade since the code. Can it be fixed ?
..it won't run on v3.3.6.1 or 3.3.8.1 either ( on Win10 ), so maybe there was no solution from the get go, regarding x64.
Not that I "need" to run x64 but your view regarding this is welcomed.

Edit: ..now that I read more about it, this would be an overkill, and misused to fit the purpose of triggering an event. 

Edited by argumentum

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...