Hi Chip, it is not on the list, but Homer Shared Object is when you do what you 
mentioned below, but even that is not displayed until you check the English, 
then uncheck it then refresh the screen...
It was unchecked when going App get and I checked it, and Homer Shared was not 
there. Then when checking the box, then unchecking it worked.
    Still it is not Boo and it does not show up.


        Bruce

Sent: Friday, July 26, 2013 8:57 PM
Subject: RE: Can We Call Win32 and shell?


Bruce,

 

I think you're not seeing the power of the WE sharedObjects object.  It is part 
of their object model, and it can be used by any language which is able to use 
the WE object model.

 

What I was suggesting is that you could write some routines for doing whatever 
you want (say putting binary data on/off of the clipboard in python), and then 
make those routines part of a shared Object by connecting to the WE object 
model.  Then, any feature you find lacking in vbs you could code up in python, 
and make available to all the vbs users.

 

The project of Jamal's I recall is named HomerBoo, and because of a small 
problem in appGet, you have to turn off the "show only English" setting in 
appGet before it will show up on the list.  I think it's described as making 
the features of .net available to WE scripters.  Yes, no Python involved, just 
showing the idea of writing code in other languages and making it available via 
the sharedObjects.

 

Hope that's clearer.

 

Chip

 

 

From: BX [mailto:bronx_...@fltg.net] 
Sent: Thursday, July 25, 2013 7:45 PM
To: gw-scripting@gwmicro.com
Subject: Re: Can We Call Win32 and shell?

 

Hi Chip,

    Since GW Object Model does do the clipboard, they could add that routine. A 
simple addition.

 

    I read his app using shared objects, but it only uses a script method not 
anything outside of that. I did not notice any Python in his app.

 

    I may in the future just have a python script in .exe portable format that 
uses any of the requested objects, it will just have to be in it's own window, 
probably minimized window.

 

    Since I have written a Cuckoo Clock program like the GW version in Python I 
did that to allow adjustment of the volume of the sounds. I have not finished 
it yet, got sidetracked this last weekend with the clipboard files feature.

    That feature comes in handy for both the file name and it's path. For both 
are attached together when calling the app I posted below.

    Yes, a nice feature to get file names and paths after copying them to the 
clipboard and you don't have to worry about copying the file itself; a later 
feature for actually copying only the file content onto the clipboard without 
opening the file the long way, just from the clipboard itself.

 

    I think these 2 apps or properties, or methods, could be added to the 
Object Model clipboard and would be a real nice handy feature. After all they 
did add the picture option, for blind users, does that make sense?

 

    So, if you learn python, download it, the 2.5 version is the only one to 
use for the compiler called pyinstall, but you could load 2.7 which has more 
features in strings and such, including unicode, but, it depends on what you 
want to know/learn.

 

 

    So, I guess this thread is now done, the next posting will be the entire 
python code for opening and closing the clipboard in Python and it actually is 
a very short routine.

    Yet below is all that is needed to add between the open and close routine, 
after opening it...of course.

 

        Bruce

 

P.S.

    The files name in the parameter list is not needed.

 

 

Sent: Thursday, July 25, 2013 7:32 PM

Subject: RE: Can We Call Win32 and shell?

 

Bruce,

 

Well, I think you know you can't get the object or routines which you want, via 
.vbs.  However, if you have implemented this in python and you want to run the 
python app concurrently, then you could supply it from the python app using the 
sharedObject mechanism of WE.  Probably not worth it for something you can do 
from vbs anyway (just slower), but for other things you may want then you might 
keep this in mind.  

 

Jamal I believe has setup some shared objects written in javascript to show 
this being done, and the homer boo app written in vs.net boo to also show using 
the shared object mechanism to get to resources you can't normally get via .vbs.

 

 

 

From: BX [mailto:bronx_...@fltg.net] 
Sent: Thursday, July 25, 2013 5:16 PM
To: gw-scripting@gwmicro.com
Subject: Re: Can We Call Win32 and shell?

 

Hi Chip,

 

    I know how to get files the normal way and someone , besides myself, wanted 
to get the file list from the clipboard. I have written a version in Python and 
could write it using studio, but just was asking about using .vbs to get the 
win32 object which is needed.

    The only way to get the file list from the clipboard is using shell and 
that is actually the easy part of getting the file list, in fact very easy.

    The only other problem is getting into the clipboard commands and that has 
to be done by win32 commands and Windoweyes does not allow that, they only give 
properties and 1 method, append

 

    They could easily add isFiles and the object they use for the clipboard 
itself, for they have to be using it for the few options they have, the only 
thing missing is the object itself.

 

    Now there are memory management calls and such, all under the win32 
clipboard command for they use open() and all the other functions.

 

    The way to get the file list is to call the shell command: 
shell.DragDropFile for that is the only way to get the files...

 

    So, the only thing I need is the actual clipboard object being used at the 
window level.

 

    Having this feature makes things a lot easier and fast and not requiring 
another app if it were built into the WE object model. I added another 
property, pasteFileNames in my code...

 

 

        Bruce

 

Sent: Thursday, July 25, 2013 4:20 PM

Subject: RE: Can We Call Win32 and shell?

 

It's not quite clear to me what you really need Bruce, but below is an example 
of how to get the list of files for a given dir in VBScript:

 

set x=getfiles("c:\temp")

' X now holds a dictionary of file names, with the index being an integer 
number starting at 1

 

 

Function getFiles(ForDir)

 

Dim fsObj

Dim folder

Dim file

Dim fileList

dim i

 

Set getFiles = Nothing

 

Set fileList = CreateObject("scripting.dictionary")

Set fsObj = CreateObject("Scripting.FileSystemObject")

 

If fsObj.FolderExists(ForDir) Then

  Set folder = fsObj.GetFolder(ForDir)

  i=0

  For Each file In folder.Files

    i=i+1

    fileList.Add i, file.name

  Next

 

  Set getFiles = fileList

End If

 

 

End Function

 

 

From: BX [mailto:bronx_...@fltg.net] 
Sent: Thursday, July 25, 2013 9:32 AM
To: gw-scripting@gwmicro.com
Subject: Can We Call Win32 and shell?

 

 

   Can we call win32 and shell commands directly using an object create method 
in vb?

 

    I have developed a program to extract file names from the clip board and 
you can display them as an array or iterate through the array list since the 
call back method is an array...

 

    So I need to have win32 and shell in order to get the clipboard handle then 
get the DragQueryFile method from the shell because files are on the system and 
have to be extracted from the shell.

 

    So, I would like to know how to get that object for the shell and win32.

 

    Could I get the clipboard object without using win32? Since the clipboard 
command you have is only for text and someone a while back wanted to get file 
names, so I can do that now if I have the way of getting the shell object from 
the system without doing the other shell object; yet I may have answered my 
question, but still want ideas.

 

        Bruce

 

 

 

Reply via email to