Thanks erictheturtle for your superb work and your explanations. The things begin to be much clear for me. Some questions :
- How is it possible to act on a specific instance/window
of Word or Excel in which the file I want to act on is already loaded ?
For example, If I have an instance of (say) Excel with the file BoBo.xls in it (each instance is visible or not, never mind) and an other instance with the file erictheturtle.xls in it, how can I "take control" over erictheturtle.xls ?
The same question with only one instance of Excel with the two files in it
- What is(are) the differences between CreateObject and GetObject ? I think the first one is to lauch an instance of Excel (or other app) and the second to act on an instance already launched, is it OK ?
- How to identify and use a particular instance of Excel (so I think in VBScript, as the fact to activate it under AHK is probably not usefull to work with it with a vbs-ahk script) ?
- I tried to use the VBScript (WSH) command "Wscript.Sleep 2500".
If (!WS_Exec("Wscript.Sleep 2500"))
Msgbox % A_LineFile " : " ErrorLevel
The answer is that there isn't any Wscript object. If I try to create a Wscript Object
If (!WS_Exec("Set oScript = CreateObject(%s)", "Wscript.Application"))
Msgbox % A_LineFile ":" ErrorLevel
(I don't know if the syntax is correct), the answer is that such an object can't be created. Probably what I did is stupid. But how I can use the sleep command ?
May be my questions are stupid. So sorry if it is the case.
Thanks by advance for your answer.
2Chris : Do you think it would be possible to integrate these functionnalities in ahk ? May be it would be possible to use continuation sections to put the vbscript in ?
Thanks for your answer