| View previous topic :: View next topic |
| Author |
Message |
dll Guest
|
Posted: Thu Aug 30, 2007 12:13 am Post subject: Persistent hide window |
|
|
I call a dll and I want to hide the messages that come from it. How can I do it?
My current solution is to have a side script that hide the window, but it always blinks, even with the SetWinDelay -1
I'm digging the onMessage without success.
Any suggestions? |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 6086
|
Posted: Thu Aug 30, 2007 12:19 am Post subject: Re: Persistent hide window |
|
|
| dll wrote: | | I call a dll and I want to hide the messages that come from it. How can I do it? |
Trialware ?  |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6804 Location: Pacific Northwest, US
|
Posted: Thu Aug 30, 2007 3:13 am Post subject: |
|
|
what dll? _________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM |
|
| Back to top |
|
 |
dll Guest
|
Posted: Thu Aug 30, 2007 11:00 am Post subject: |
|
|
dll is EZTW32.DLL
It's for twain, the window that I want hide is the warnings that came frome twain, feeder without paper, etc. |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 6086
|
Posted: Thu Aug 30, 2007 11:04 am Post subject: Re: Persistent hide window |
|
|
| dll wrote: | | but it always blinks, even with the SetWinDelay -1 |
It is hard to avoid that blink .. Can you post a small portion of the code?  |
|
| Back to top |
|
 |
dll Guest
|
Posted: Thu Aug 30, 2007 11:15 am Post subject: |
|
|
Is there a way to make the script to not stop until receives return from dll call? the problem is as the script wait for dll return, the dll post a window. Maybe making another thread inside script?
| Code: |
SetWinDelay -1
;I'm trying catching here without success
OnMessage(0x00000287,"fn")
fn(wParam, lParam)
{
msgbox dsdw
return
}
:it shows window here if it have no paper
DllCall("eztw32.dll\TWAIN_AcquireToFilename", UInt,0,"Str","wa.bmp") |
|
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 6086
|
Posted: Thu Aug 30, 2007 11:18 am Post subject: |
|
|
I do not think OnMessage() would work here as the dialog is not from AHK!
What will the title of the dialog be ? Will it change for different messages ?
 |
|
| Back to top |
|
 |
dll Guest
|
Posted: Thu Aug 30, 2007 11:23 am Post subject: |
|
|
the title is allways the same.
The window is parent from the script, I see with winspector and it's in a subtree of the script. |
|
| Back to top |
|
 |
dll Guest
|
Posted: Thu Aug 30, 2007 3:01 pm Post subject: |
|
|
Isn't a workaround this?
Tanks |
|
| Back to top |
|
 |
dll Guest
|
Posted: Fri Aug 31, 2007 11:04 am Post subject: |
|
|
I'm trying to get if the scanner have the feeder loaded, is this dllcall right?
| Code: | DllCall("eztw32.dll\TWAIN_GetCapCurrent",UInt,"CAP_FEEDERLOADED",UInt,"TWTY_BOOL","Cdecl Int*",aso)
msgbox %aso% |
and here is the source function of eztw32.dll:
| Code: | int EZTAPI TWAIN_GetCapCurrent(unsigned Cap, unsigned ItemType, void FAR *pVal)
{
TW_CAPABILITY cap;
void far * pv = NULL;
BOOL bSuccess = FALSE;
assert(pVal != NULL);
if (nState < TWAIN_SOURCE_OPEN) {
TWAIN_ErrorBox("Attempt to get capability value below State 4.");
return FALSE;
}
// Fill in capability structure
cap.Cap = Cap; // capability id
cap.ConType = TWON_ONEVALUE; // favorite type of container (should be ignored...)
cap.hContainer = NULL;
if (TWAIN_DS(DG_CONTROL, DAT_CAPABILITY, MSG_GETCURRENT, (TW_MEMREF)&cap) &&
cap.hContainer &&
(pv = GlobalLock(cap.hContainer))) {
if (cap.ConType == TWON_ENUMERATION) {
TW_ENUMERATION far *pcon = (TW_ENUMERATION far *)pv;
TW_UINT32 index = pcon->CurrentIndex;
if (index < pcon->NumItems && TypeMatch(pcon->ItemType, ItemType)) {
LPSTR pitem = (LPSTR)pcon->ItemList + index*nTypeSize[ItemType];
FMEMCPY(pVal, pitem, nTypeSize[ItemType]);
bSuccess = TRUE;
}
} else if (cap.ConType == TWON_ONEVALUE) {
TW_ONEVALUE far *pcon = (TW_ONEVALUE far *)pv;
if (TypeMatch(pcon->ItemType, ItemType)) {
FMEMCPY(pVal, &pcon->Item, nTypeSize[ItemType]);
bSuccess = TRUE;
}
}
}
if (pv) GlobalUnlock(cap.hContainer);
if (cap.hContainer) GlobalFree(cap.hContainer);
return bSuccess;
}
|
|
|
| Back to top |
|
 |
superbem
Joined: 30 Jul 2007 Posts: 20
|
Posted: Sat Sep 01, 2007 12:44 am Post subject: |
|
|
Please some more help would be appreciated.
Should I make other topic since it is not really to do with hide window? |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6804 Location: Pacific Northwest, US
|
Posted: Tue Sep 04, 2007 5:32 pm Post subject: |
|
|
probably _________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM |
|
| Back to top |
|
 |
|