
jezzzzy
Active Members-
Posts
140 -
Joined
-
Last visited
jezzzzy's Achievements

Adventurer (3/7)
0
Reputation
-
Can anyone point me in the direction of how to enable and disable secondary monitors in Windows 7? Have need to enable the 3rd screen and disable the 2nd (and vice versa). Looked through the winAPI include and searched the forums - didn't find anything. Any help is appreciated.
-
Trying to work with an .ocx file but have limited COM knowledge and little/no documentation on the methods or properties of the object. I ran OLEViewer and have a list of the methods but don't know where to go from here. Here is my very simple code: $objTapi = ObjCreate("AvayaPhoneInterface.PhoneInterfaceCtrl.1") $event = ObjEvent($objTapi,"TAPIEvent_") With $objTapi .switchIpAddress = "10.0.0.180" ;more methods to go here EndWith While 1 ;nothing here yet WEnd Func TAPIEvent_($Eventname) MsgBox(0,"event",$Eventname) EndFunc Here is a part of the OLEViewer results: dispinterface _DPhoneInterface { properties: methods: [id(0x00000001)] short registerExtension( short forceLogin, VARIANT switchIpAddress, VARIANT extension, VARIANT password, VARIANT telecommuteNumber, VARIANT vpnOverideIp, short controlOnly, short emergencyHandling, VARIANT emergencyHandlingAtNumber); [id(0x00000002)] void offHook(); [id(0x00000003)] void onHook(); [id(0x00000004)] void dialDigits(VARIANT digitString); [id(0x00000005)] void pushButton( short buttonNumber, short buttonModule); [id(0x00000006)] void transfer(); [id(0x00000007)] void conference(); [id(0x00000008)] void hold(); [id(0x00000009)] void drop(); [id(0x0000000a)] void unregisterExtension(); [id(0x0000000b)] void beep( short frequency, short duration); I guess I don't know what the "variants" or "shorts" are. Once I get past the "registerExtension" method, I think I will be able to figure it out. All I get with the above code is "The requested action with this object has failed."
-
Hey guys. Looking through the forums for a way to semi-protect my scripts - not finding much success. I am making a script and am planning on charging a nominal fee. I just need a simple way to keep people from emailing it to their friends. Here is my thought process: Maybe get unique pc id (processor id, mac address, something?) - I think doing this would require me to compile a different exe for each purchaser. - Although I could keep an index of IDs online and have app check to see if a particular ID is allowed. Any suggestions?
-
So ObjEvent() catches all events no matter their originating method? And then I just have to have function names that start with the prefix defined in ObjEvent()? If Yes to both of those questions, then how does ObjEvent know which of my functions go with which event? Based on your example, I think I need to use the bolded portion of this: Public Event SiriusEventSignalStrength As Sirius.SignalParamsEvent with my prefix concatenated on the front. Sorry if it seems like i'm being elementary about this - I'm just trying to get a solid grasp the fundamentals. edit: bold
-
Where does that prefix come from? Is it something that I choose, or does it correspond to one of the delegates or something in the event syntax?: Public Event SiriusEventSignalStrength As Sirius.SignalParamsEvent The AutoIT help file says "The prefix is appended by the Objects method name." I'm not sure what that means. The method in my SignalStrength example is "GetSignalStrength". The visual basic event syntax is: "Public Event SiriusEventSignalStrength As Sirius.SignalParamsEvent". So it seems like the 'As Sirius.SignalParamsEvent' is a type that the event is being cast as. So I'm guessing that the part I need to use is the 'SiriusEventSignalStrength' part. Just don't know what do do with it. edit: typo
-
Ok. I have a custom DLL that has many methods that return events. I have studied up on ObjEvent but nearly everything has to do with IE.au3. The documentation that came with this DLL identifies lots of events that have a visual basic syntax like this: Public Event SiriusEventAntennaStatus As Sirius.AntennaStatusParamsEvent or Public Event SiriusEventChannelData As Sirius.ChannelDataParamsEvent or Public Event SiriusEventCommError As Sirius.StringParamsEvent The Class Library also identifies "Delegates". They are the following: Sirius.AntennaStatusParamsEvent Sirius.ChannelDataParamsEvent Sirius.ChannelParamsEvent Sirius.NoParamsEvent Sirius.SignalParamsEvent Sirius.SongInfoDataParamsEvent Sirius.StringParamsEvent Sirius.VBChannelDataParamsEvent Sirius.VBSongInfoDataParamsEvent Here is the test code i have started: $oSirius = ObjCreate("SiriusComm.Sirius") $oEvent = ObjEvent($oSirius,"NoParamsEvent") WITH $oSirius .PowerOn .ComPort = 6 .Open ENDWITH ;--Wait for open connection While $oSirius.isopen = 0 sleep(1000) ConsoleWrite("Waiting...") ;stuff Wend ConsoleWrite("Done" & @CRLF) ;--Try to receive an event notification $var = $oSirius.GetSignalStrength MsgBox(0,"var",$var) While 1 Sleep(500) ConsoleWrite("Testing Event Retrieval...Waiting for event" & @CRLF) WEnd ;~ $oSirius.Close Func NoParamsEvent($Eventname) MsgBox(0,"EVENT: " & $Eventname) EndFunc Func SiriusEventRadioReady($text) MsgBox(0,"RADIO_READY: " & $Text) EndFunc Func SiriusEventPortOpened($Text) ; In the complete script (see link below) we show the contents in a GUI Edit box. MsgBox(0,"PORT_OPEN: " & $Text) EndFunc Func SIRIUS_EVENT_RADIO_NOT_FOUND($Text) ; In the complete script (see link below) we show the contents in a GUI Edit box. MsgBox(0,"RADIO_NOT_FOUND: " & $Text) EndFunc Func SIRIUS_EVENT_COMM_ERROR($Text) ; In the complete script (see link below) we show the contents in a GUI Edit box. MsgBox(0,"COMM_ERROR: " & $Text) EndFunc I guess in short, I'm not sure what is supposed to go in this line: $oEvent = ObjEvent($oSirius,"NoParamsEvent") I have tried many combinations of the various event names listed in the Class Library to no success. The help file seemed to say that I could set up a universal catch for events like this: Func NoParamsEvent($Eventname) MsgBox(0,"EVENT: " & $Eventname) EndFunc But it doesn't work.
-
Ok. I resolved this issue. Solution is below if anyone else has a similar problem. Apparently my DLL was a .net assembly. I had to use regasm.exe to get the dll registered in the com library. Then I had to use the /codebase switch in regasm to register the DLL in the GAC.
-
Sorry to post several times between responses - but I think this may be relevant. I looked in the OLE Viewer and found my object. It's called SiriusComm.Sirius. However running this: $oSirius = ObjCreate("SiriusComm.Sirius") MsgBox(0,"isObj",isobj($oSirius)) Returns 0.
-
FYI. When I use regsvr32 I get a message that says "SComm.dll was loaded, but the DllRegisterServer entry point was not found. This file can not be registered."
-
Is there a certain way to register the DLL or should I simply use regsvr32.exe.
-
I have a DLL that works with a piece of hardware (SComm.dll). I have a Class Library for this DLL (contains different Methods, Properties, Events, etc.). I have tried to do a DLLCall with this SComm.dll file and put a Method name in the Function parameter like this: $dll = DllCall("SComm.dll","str","GetSignalStrength") This returns a "Function Not Found" error. So I did some searching and I now think that I should be using this DLL with COM objects. However, I have tried to create an object with various classes and keep getting failure. Do I need to register the DLL in my system? Maybe I'm using the wrong Class? I'm happy to solve this problem myself, but if someone can point me in the right direction it would be very helpful. I have checked in my system's Component Services but cannot find my class listed. Maybe I'm looking in the wrong section. Maybe my class needs to be registered. Any help is appreciated.
-
Disabling it in the off chance that the user unhides the window with the task tray icon during the update. I may just disable the "unhide" option during the update. That seems to be a good workaround. Thanks for helping me noodle the problem.
-
They get called once each update cycle (generally every 30s).
-
The URL is woot.com. If you hit the site today, during the wootoff, you will see the progress bar that I can't seem to capture. If it would help to see the script, here's the location (i've posted this previously to the "Example Scripts" group): You can download here: www.w-woot.com Note: script has a pseudo-installer function (adds a program group, control panel uninstall group, and a temp folder for storing settings) - I know some don't like installers. Edit: added script download location