Search found 4 matches

by PeirceEd
Fri Sep 06, 2024 8:58 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Invoke Virtual Keyboard?
Replies: 16
Views: 15645

Re: Invoke Virtual Keyboard?

Here is the AppleScript code that lists all the menu items pertaining to the Text Input menu on the Mac OS (the menu that shows up on the top right side of the screen when the Keyboard viewer is turned on in the system's preferences):

tell application "System Events"
tell process ...
by PeirceEd
Fri Sep 06, 2024 8:32 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Invoke Virtual Keyboard?
Replies: 16
Views: 15645

Re: Invoke Virtual Keyboard?

I have found that the following Applescript code can bring the MacOS's Keyboard Viewer into view (tried on MacOS Monterey, Apple M1):

tell application "System Events"
tell process "TextInputMenuAgent"
-- Click the first menu bar item
click menu bar item 1 of menu bar 2
-- Click "Show Keyboard ...
by PeirceEd
Sun Feb 05, 2023 1:06 am
Forum: Talking LiveCode
Topic: Collapse and expand Tree View Widget from code
Replies: 18
Views: 31232

Re: Collapse and expand Tree View Widget from code

Or here's the same solution but much shorter and faster, come to think of it:

on expandEntireTree pWidgetID,pCardNumber,pStackName
lock screen
local pFoldArray,tK1s,tK2s,tK3s,tK4s,tK5s,tK6s,tK1,tK2,tK3,tK4,tK5,tK6,tL,pData
set the foldState of widget id pWidgetID of cd pCardNumber of stack ...
by PeirceEd
Sun Feb 05, 2023 12:42 am
Forum: Talking LiveCode
Topic: Collapse and expand Tree View Widget from code
Replies: 18
Views: 31232

Re: Collapse and expand Tree View Widget from code

Here is one solution for expanding a tree completely, up to six levels. There may be a way to do it recursively but this solution has the advantage of avoiding a headache.

on unfoldEntireTree pWidgetID,pCardNumber,pStackName
lock screen
local pFoldArray,tK1s,tK2s,tK3s,tK4s,tK5s,tK6s,tK1,tK2,tK3 ...