Using shell on Windows

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Using shell on Windows

Tom Glod via use-livecode
Attempting to debug an ugly memory problem on a remote machine, I've installed
pslist.exe, one of the SysInternals tools, and want my LiveCode script to
invoke it via "shell" at various intervals to get some data about memory usage.

Initially I just dropped pslist.exe into the same folder as my Windows
standalone. But the call to
        shell("pslist -m myapp")

returned
        'pslist' is not recognized as an internal or external command, operable
program or batch file.

I verified that in the DOS terminal window, this was the same result as
attempting to invoke pslist from any other directory. So I moved it into a
directory that was already in the PATH. Now I could invoke it succesfully from
any directory, in the DOS window. But when my standalone ran, the result was
the same.

So then I got desperate, and coded my LiveCode app to use the full path to the
exe, but I just got

        'C:\Windows\System32\pslist.exe' is not recognized as an internal or external
command, operable program or batch file.

I hope I am missing a simple thing - how can I invoke a windows exe in this
way through the shell command?

TIA,

Ben

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Scrollbar control and auto complete confusion

Tom Glod via use-livecode
Folks:
In livecode 8.1.7 (RC2), I drag a scrollbar to the window of a new stack. I the scrollbar script, I put the following code:

on dragLeave

        answer  “here"

end dragLeave

The “dragLeave” message is shown in the autocomplete list. There are numerous other entries in the autocomplete list in the IDE editor, that look like messages that are sent for various operations.

I get nothing when I move the scroll with the mouse. Same behavior for “slider” and “scrollbar” controls in 9.0.0 (DP9).

What’s up? Is this a bug, confusion on my part? Seems non-intuitive. It seems to me that there are a LOT of entries in the auto-complete list that do nothing relevant to the control. If I put the handler in the stack script, I also get nothing.

Best,
Bill P



William A. Prothero
http://earthlearningsolution.org/

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Scrollbar control and auto complete confusion

Tom Glod via use-livecode
Hi Bill,
probably best in this instance to refer to the dragLeave entry in the
dictionary - "Sent when the mouse pointer moves out of an object during a drag
and drop." So, this is relevant to all controls including the scrollbar,
but perhaps not in the way you would think immediately.

PS, you can use the documentation tab in the script editor to display brief
info about the livecode syntax token at the current text entry point, or
right click on a token and choose 'Find in docs' to see the dictionary
entry.

On Tue, Oct 3, 2017 at 8:24 PM William Prothero via use-livecode <
[hidden email]> wrote:

> Folks:
> In livecode 8.1.7 (RC2), I drag a scrollbar to the window of a new stack.
> I the scrollbar script, I put the following code:
>
> on dragLeave
>
>         answer  “here"
>
> end dragLeave
>
> The “dragLeave” message is shown in the autocomplete list. There are
> numerous other entries in the autocomplete list in the IDE editor, that
> look like messages that are sent for various operations.
>
> I get nothing when I move the scroll with the mouse. Same behavior for
> “slider” and “scrollbar” controls in 9.0.0 (DP9).
>
> What’s up? Is this a bug, confusion on my part? Seems non-intuitive. It
> seems to me that there are a LOT of entries in the auto-complete list that
> do nothing relevant to the control. If I put the handler in the stack
> script, I also get nothing.
>
> Best,
> Bill P
>
>
>
> William A. Prothero
> http://earthlearningsolution.org/
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Scrollbar control and auto complete confusion

Tom Glod via use-livecode
Ali:
Interesting. I wonder, doesn’t it violate the usefulness of autocomplete if there are a bunch of items listed that don’t pertain to the control being edited? I somehow had assumed that the list was adjusted to be relevant to the particular control’s script in question.
Best,
Bill

> On Oct 3, 2017, at 1:14 PM, Ali Lloyd via use-livecode <[hidden email]> wrote:
>
> Hi Bill,
> probably best in this instance to refer to the dragLeave entry in the
> dictionary - "Sent when the mouse pointer moves out of an object during a drag
> and drop." So, this is relevant to all controls including the scrollbar,
> but perhaps not in the way you would think immediately.
>
> PS, you can use the documentation tab in the script editor to display brief
> info about the livecode syntax token at the current text entry point, or
> right click on a token and choose 'Find in docs' to see the dictionary
> entry.
>
> On Tue, Oct 3, 2017 at 8:24 PM William Prothero via use-livecode <
> [hidden email]> wrote:
>
>> Folks:
>> In livecode 8.1.7 (RC2), I drag a scrollbar to the window of a new stack.
>> I the scrollbar script, I put the following code:
>>
>> on dragLeave
>>
>>        answer  “here"
>>
>> end dragLeave
>>
>> The “dragLeave” message is shown in the autocomplete list. There are
>> numerous other entries in the autocomplete list in the IDE editor, that
>> look like messages that are sent for various operations.
>>
>> I get nothing when I move the scroll with the mouse. Same behavior for
>> “slider” and “scrollbar” controls in 9.0.0 (DP9).
>>
>> What’s up? Is this a bug, confusion on my part? Seems non-intuitive. It
>> seems to me that there are a LOT of entries in the auto-complete list that
>> do nothing relevant to the control. If I put the handler in the stack
>> script, I also get nothing.
>>
>> Best,
>> Bill P
>>
>>
>>
>> William A. Prothero
>> http://earthlearningsolution.org/
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Scrollbar control and auto complete confusion

Tom Glod via use-livecode

> On 4 Oct 2017, at 9:37 am, William Prothero via use-livecode <[hidden email]> wrote:
>
> Interesting. I wonder, doesn’t it violate the usefulness of autocomplete if there are a bunch of items listed that don’t pertain to the control being edited?

dragLeave can be used by a scrollbar. Note that all the completions from the docs have a summary shown so you can get a reasonable idea what they are for if you are unfamiliar with them before applying.

> I somehow had assumed that the list was adjusted to be relevant to the particular control’s script in question.

It is adjusted for the control type (at least the messages are). They are filtered using the associations element in the dictionary.

Cheers

Monte
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode