Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ External MUClient text window
External MUClient text window
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1
2 3
4
Posted by
| Poromenos
Greece (1,037 posts) Bio
|
Date
| Reply #15 on Wed 17 Mar 2004 04:52 PM (UTC) |
Message
| Yes, I see what you mean... By =nothing, I meant that if you're going to close the windows anyway (in your implementation), you might as well set the object to nothing (i.e. you don't gain anything in lines of code)... I just don't think that it's important enough to rewrite the entire program (i don't know anyone using it yet :p), but if you want to try it, I can post the sources somewhere... |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | Top |
|
Posted by
| Shadowfyr
USA (1,791 posts) Bio
|
Date
| Reply #16 on Wed 17 Mar 2004 11:09 PM (UTC) |
Message
| Nah.. If I can work out a few technical issues (like the stupid lack of an API or DLL that supports telling a form to enter design mode), I will be designing my own that does work like that anyway. The reason is to save resources and because I want to be able to host any extra stuff like color converters or things in the service as well. That and being able to use design mode to edit the window layout and set which calls it should make or text clicking a button should send, etc.
I have found a dll that comes with VB6.0 that provides a way to read the info for an object, so I can make calls to it and maybe respond to its events, even if not pre-coded into the program, but I am not sure. VB tends to screw you with respect to doing anything actually "dynamic". But the inability to get a form to enter design mode is a pain. I could code a class in C++ to do it, in theory and have that in a DLL, but I suck at C++. As in, I haven't a clue how to create such a class and make it a usable DLL. :( I am not even sure if it would work on a VB form if I could... | Top |
|
Posted by
| David
USA (49 posts) Bio
|
Date
| Reply #17 on Fri 23 Apr 2004 02:55 AM (UTC) |
Message
| DL'd the MUClientWindow.exe
Copied and pasted the alias...
Get this:
Error number: -2146827949
Event: Execution of line 3 column 1
Description: Unknown runtime error: 'CreateObject'
Line in error:
Called by: Immediate execution
|
My code(with a LOT of Nicks help) to fame:
sub OnAutoCombo (TriggerName, TriggerLine, arrWildCards)
dim AutoCombo
AutoCombo = split (arrWildCards (1))
Dim i, attack
for i=lbound (AutoCombo ) to ubound (AutoCombo )
Select Case AutoCombo (i)
case "rp" attack = "punch right"
case "lp" attack = "punch left"
case "s" attack = "sweep"
case "r" attack = "roundhouse"
case else attack = "" ' unknown attack type
End Select
if i = ubound (AutoCombo ) then
world.send "throw " + world.getvariable ("attacker") + " down"
else
world.send attack + " " + world.GetVariable ("attacker")
end if
next
end sub
| Top |
|
Posted by
| Shadowfyr
USA (1,791 posts) Bio
|
Date
| Reply #18 on Fri 23 Apr 2004 04:27 AM (UTC) Amended on Fri 23 Apr 2004 04:29 AM (UTC) by Shadowfyr
|
Message
| The problem David is that COM objects must be 'registered' before they become available. This can usually be done by simply running the EXE once. VB programs have code built in that automatically registers them for use, in theory. Sometimes it won't work, in which case you can try again or try going into a dos windows, CD to the directory you saved the MUClientWindow.exe program in and type:
Regsvr32 MUClientWindow.exe
--------
A better option for those making plugins for these sorts of things is to use something like the following in your code:
dim lcount
do
on error resume
set hndl = creatobject("*object_name*")
on error goto 0
if typename(hndl) <> "*type*" then
set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.exec("Regsvr32 c:\program files\mushclient\worlds\plugins\*your_program.exe*")
exit loop
end if
lcount = lcount + 1
loop until typename(hndl) = "*type*" or lcount > 1
if if typename(hndl) <> "*type*" then
note "Error here...."
exit sub
end if
Where *type* is whatever the typename() function normally returns for your object, *object_name* is the object you create, like 'MUClientWindow.TextBox' and *your_program* is the exe or dll containing it. This should, if the directory and everything is right, automatically register the object, even if not currently available. An even better method is to use some sort of installer to register it for you, but people like Poromenos are apparently a bit lazy. ;) | Top |
|
Posted by
| David
USA (49 posts) Bio
|
Date
| Reply #19 on Fri 23 Apr 2004 04:41 AM (UTC) |
Message
| Ok, I did run the MUClient window first...
Going into cmd prompt and typing that didn't work.
As for that code you put in down there, Not too sure where that goes... |
My code(with a LOT of Nicks help) to fame:
sub OnAutoCombo (TriggerName, TriggerLine, arrWildCards)
dim AutoCombo
AutoCombo = split (arrWildCards (1))
Dim i, attack
for i=lbound (AutoCombo ) to ubound (AutoCombo )
Select Case AutoCombo (i)
case "rp" attack = "punch right"
case "lp" attack = "punch left"
case "s" attack = "sweep"
case "r" attack = "roundhouse"
case else attack = "" ' unknown attack type
End Select
if i = ubound (AutoCombo ) then
world.send "throw " + world.getvariable ("attacker") + " down"
else
world.send attack + " " + world.GetVariable ("attacker")
end if
next
end sub
| Top |
|
Posted by
| Shadowfyr
USA (1,791 posts) Bio
|
Date
| Reply #20 on Fri 23 Apr 2004 05:09 AM (UTC) |
Message
| The code was a suggestion for people making such things, not you, that is why I seperated it with ------.
I am not sure what the problem is though, since it should be registered and thus usable.. I have no idea what the error actually means, neither does the web apparently. :( I haven't a clue what is wrong. | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #21 on Fri 23 Apr 2004 07:15 AM (UTC) |
Message
| Regsvr32.exe is a program that may not be installed by default. Have a hunt for it on your hard disk. The code for that is about 15 lines. You should be able to find a copy on the web or your install disks somewhere. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #22 on Fri 23 Apr 2004 07:16 AM (UTC) |
Message
| However I think it is for DLLs. The exe you should be able to just run to self-register. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Poromenos
Greece (1,037 posts) Bio
|
Date
| Reply #23 on Fri 23 Apr 2004 04:29 PM (UTC) |
Message
| Yes, I think the executable self-registers when run... And i'm not lazy! Well, maybe a little :p
|
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | Top |
|
Posted by
| David
USA (49 posts) Bio
|
Date
| Reply #24 on Fri 23 Apr 2004 04:58 PM (UTC) |
Message
| I still get that error, When I open up my task manager it shows that the windows are supposed to be there, but there is no window |
My code(with a LOT of Nicks help) to fame:
sub OnAutoCombo (TriggerName, TriggerLine, arrWildCards)
dim AutoCombo
AutoCombo = split (arrWildCards (1))
Dim i, attack
for i=lbound (AutoCombo ) to ubound (AutoCombo )
Select Case AutoCombo (i)
case "rp" attack = "punch right"
case "lp" attack = "punch left"
case "s" attack = "sweep"
case "r" attack = "roundhouse"
case else attack = "" ' unknown attack type
End Select
if i = ubound (AutoCombo ) then
world.send "throw " + world.getvariable ("attacker") + " down"
else
world.send attack + " " + world.GetVariable ("attacker")
end if
next
end sub
| Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #25 on Sat 24 Apr 2004 04:22 AM (UTC) |
Message
| Can't help beyond that. This is why I don't like using VB. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Karl_Newbie
USA (23 posts) Bio
|
Date
| Reply #26 on Tue 01 Jun 2004 07:49 AM (UTC) |
Message
| Oh this seems like a great concept but I don't understand. I run the program and nothing happens :) I get the two windows when I used 'dodemo' alias, but never any input going to or coming from the mud.
Don't worry about it :) | Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #27 on Tue 01 Jun 2004 08:07 AM (UTC) Amended on Tue 01 Jun 2004 08:14 AM (UTC) by Flannel
|
Message
| You have to set up a trigger/alias to send text to it. Trigger if its mud text, alias if you want to send something to it manually. His DoDemo is just an example of things that can be done.
Poromenos, can you post the source somewhere? or send to me? Id like to fiddle.
And also, I couldnt seen to click close on the transparent window. Couldnt move it or anything. Had to kill it via task manager. Im sure closing MC wouldve worked too. But, point being couldnt "x" out of it like the non transparent one. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | Top |
|
Posted by
| Ked
Russia (524 posts) Bio
|
Date
| Reply #28 on Tue 01 Jun 2004 12:49 PM (UTC) |
Message
| Yes, yes - post the source. I don't use VB myself but I am constantly poking at trying to find a (correctly) working solution to this in Python and seeing how it's done in VB might cause some insights. | Top |
|
Posted by
| Poromenos
Greece (1,037 posts) Bio
|
Date
| Reply #29 on Tue 01 Jun 2004 08:24 PM (UTC) |
Message
| Sure, I'll clean it up a bit, add comments and post it. The reason you couldn't move the transparent window is because it was transparent :p The click goes to the window below it. If you just want it to be transparent but not click-through, you need to use the "opacity" feature. Transparency and opacity are entirely different... The window can be transparent while being 100% opaque... Maybe i should change the name on that one... |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
139,454 views.
This is page 2, subject is 4 pages long:
1
2 3
4
It is now over 60 days since the last post. This thread is closed.
Refresh page
top