r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Windows/COM Support]

Terry
10-Jul-2006
[235x3]
http://home.wilddsl.net.au/anton/rebol/os/windows/COMLib/files.html
TTS worked, the ms agent just had the bubble.

I have some old ms agent code around somewhere that I used with LFReD, 
along with a dialect.. I'll see if i can find it.
The MS TTS is pretty old technology.. Sounds like Vista may has much 
better speech recognition and a new TTS.  Should check out the beta.
Anton
10-Jul-2006
[238x2]
Righto, thanks :)
We'll find out what the difference is.
Terry
10-Jul-2006
[240x3]
COM with PHP is soo easy...  drop this into a page on your local 
server.. 

<?

$word=new COM("word.application") or die("Cannot start word for you");
print "Loaded word version ($word->Version)\n";
$word->visible =1;
$word->Documents->Add();
$word->Selection->Typetext("Dit is een test");
$word->Documents[1]->SaveAs("burb ofzo.doc");
$word->Quit();
?>
Want Macro support.. ? 

<?
$obj = new COM("AutoItX3.Control");
$obj->CDTray ("H:", "open");
$obj->Sleep (1000);
$obj->CDTray ("H:", "close");
?>
Not to be critical, but the php syntax is much clearer.
Anton
10-Jul-2006
[243x2]
Yes, you can do the chaining of objects easily, and pass args to 
functions directly, without using the printf-style syntax.
I am quite sure I can do better with rebol, but I would have to turn 
DispHelper inside out to find out the way. As it is, I have left 
DispHelper untouched.
Terry
10-Jul-2006
[245]
How RT manages to charge for library access I'll never understand 
(even though I paid for it .. once).
Anton
10-Jul-2006
[246]
Looks like you just set the .TTSModeID
Robert
10-Jul-2006
[247]
Anton, if you made it with the OL connection let me know.
Anton
10-Jul-2006
[248]
.. but when I set TTSModeID it doesn't work. I am not sure if I am 
using the right TTSModeID or if I am passing it correctly...

Robert, I'm extracting Outlook Calendar Appointments and Contacts. 
Just rudimentary at the moment, though. I haven't figured out how 
to surely extract all the properties.
Robert
10-Jul-2006
[249]
And  I want to import those into IOS/xpeers :-) so that we can sync 
to OL. Maybe even in both ways.
Anton
10-Jul-2006
[250]
I will publish what I have in the next day or two.
Terry
10-Jul-2006
[251]
Here's TTS in PHP.. 

<?
$voice = new COM("SAPI.SpVoice");
$voice->Speak("Hello, lets have a conversation");
?>
Anton
10-Jul-2006
[252x2]
tts: CreateObject "Sapi.SpVoice"
CallMethod [tts ".Speak(%s)" "Hello, let's have a conversation"]
pretty similar in COMLib.
Henrik
10-Jul-2006
[254]
wouldn't it be prettier with:

tts: CreateObject [Sapi SpVoice]
tts/call [Speak "Hello, let's have a conversation"]

just to make the syntax more smooth and REBOLish... :-)
Anton
10-Jul-2006
[255x3]
Hmm... yes. Of course, if I could just choose the syntax I would 
make it much better. For now, still in learning mode.
Terry, I found some Agent code in HAL 4000 package. Looks pretty 
similar to other demos I have seen. I don't see what exactly I'm 
doing wrong there. I am very suspicious about the TTSModeID setting 
not working. I'll have to follow that up at some stage.
Thanks for your test.
Allen
10-Jul-2006
[258]
Does the ado stuff work with this new beastie? http://www.microsoft.com/sql/ctp_sqleverywhere.mspx
.
Anton
11-Jul-2006
[259x3]
No idea. Do you need it ?
I guess the question is: does COMLib work with ADO.NET ?
I think that depends on whether ADO.NET supports the older ADO interface 
or not.
BrianH
11-Jul-2006
[262]
A better question is whether COMlib supports OLEDB, which is COM-based. 
SQL Everywhere works with OLEDB too.
Anton
11-Jul-2006
[263]
Well, if it really is COM based, then I imagine it should work.
Anton
13-Jul-2006
[264x2]
COMLib website update:
Added outlook-calendar.r and outlook-contacts.r demos.
Fixed a few bugs in the main rebol interface file, COMLib.r
http://home.wilddsl.net.au/anton/rebol/os/windows/COMLib/
Robert, have a look at the outlook demos.
Robert
15-Jul-2006
[266x2]
Not yet, sorry, was busy. I will. Thanks for posting this stuff.
And, as I don't use OL myself, I need to setup a test system.
Graham
15-Jul-2006
[268]
Anton, is there a way to use Com and OneNote?
Anton
15-Jul-2006
[269]
Not sure on this. The postings I find about the COM interface in 
OneNote a few years ago make the interface sound very lacking. Not 
sure it's much better now a few year have gone by or not.
BenK
19-Jul-2006
[270]
Is there any way to get around the fact that Rebol faces are not 
native Windows "windows"? (i.e. don't have a handle on the system). 
Speech recognition command & control does not work with Rebol apps 
as long as that is the case and I need that...
Anton
19-Jul-2006
[271]
Hmm.. the system port can be used to trap windows messages, perhaps 
if the command & control uses windows messages you can handle them 
that way... Can you give more information about the speech recognition 
software used ? (Is it MS software ? etc..)
BenK
19-Jul-2006
[272]
The Speech Reco software is the one that comes built-in with Windows 
XP and Windows Vista (BTW, speech reco in Vista is much better than 
in XP). It analyzes widgets on the screen by running through all 
the windows handles (just about everything on a Windows screen is 
a window) and their labels, so it actually knows there's a menubar 
with a file menu on it so you can do things like say "Menu" "File" 
"Open" and it simply works for almost all native apps. It sends the 
equivalent commands by sending Windows messages to the windows. Problem 
is, since Rebol widgets do not have their own handles, the system 
never finds them, doesn't know they're there or that messages can 
be sent to them...
Anton
19-Jul-2006
[273]
I think that's a tough one.
BrianH
19-Jul-2006
[274]
It would probably be easier to wrap the Speech API and use it directly.
BenK
19-Jul-2006
[275]
That ouwl defeat the purpose; the idea is that the system works for 
all apps and that the apps themselves do not need to do anything 
to have it. Wrapping the API and then building it into every single 
app is not a feasible option. Do you think it's possible to adapt 
the Vid and RebGUI dialects to integrate with the SPeech API so everything 
built with those at least would work? (don't know much about how 
dialects work yet)
Anton
20-Jul-2006
[276]
That's a big job, I'm afraid.
Gregg
20-Jul-2006
[277]
I don't know of anyone that's wrapped the ability to use native Windows 
controls in a REBOL dialect, though it *might* be possible. I think 
Cal (and maybe Cyphre or Oldes) have emebedded native OS windows 
in a View window. You might also be able to do it by creating your 
own windows, using the API, and then interacting with them behind 
the scenes. It would be a lot of work though, and be highly OS specific.
Cyphre
20-Jul-2006
[278]
Yes, with the DLL interface you can theoretically create native-like 
GUI system according to your needs if you have enough time/motivation 
;)
Graham
20-Jul-2006
[279]
While maintaining the flexibility of VID/rebGuI ?
Cyphre
20-Jul-2006
[280]
If you write VID/RebGUI like dialect with binding to Windows native 
GUI why not? :)
Pekr
20-Jul-2006
[281]
hmm, not sure Cyphre, but you are the guru. Does windows has anything 
like face? If you would use only its windowing system, it is just 
what win32API allows you - dialogs, etc. - so no such flexibility, 
unless you would code View like compositing yourself
Graham
20-Jul-2006
[282]
Cool :)
Cyphre
20-Jul-2006
[283]
Pekr: You can create and control any windows dialog if you have the 
API available. (and this can be applied to any other OS feature). 
So it is possible to create native GUI controlable at the higher 
level of some dialect(simmilar to VID/Rebgui). People who are making 
common apps don't need to access it at face level but ofcourse such 
system would be based on face-like objects with methods related to 
Windows GUI elements etc.
Henrik
20-Jul-2006
[284]
the same could probably be done for OSX/Cocoa... it would solve many 
issues with GUI nativity in OSX.