SUCCESS! and some questions of finesse

I am thrilled to report that I have a database (well, group of 5 databases) up and running in Panorama X.It looks great, and is a significant step forward from the Panorama 6 version - in part due to new ideas I have had, but also in large part due to the improvements in Panorama X itself.

I still find the searches relatively slow, (although the form lists are super quick), and have to sit and wait for programmes to execute, which I didn’t have to in Panorama 6. However, I can get around this by adjusting the point at which I do the slower processes - having them run as a group - while I go and get a coffee, rather than one at a time, as I enter the data.

I have several questions, which would help the final product to be that much better, if they are possible.

  1. with regard the group programme run mentioned above - if the computer goes to sleep during the process, it seems to stop the programme - often citing an error (I think a field/variable not existing). If i sit at the computer, and touch the mouse periodically to keep it awake, it executes perfectly. Is there something I can do in the programming to keep it awake while it runs?
  2. I am entering data into forms using Text Editor objects. If I tab between boxes, the cursor appears at the end of the text. What I would prefer, is the text highlighted, so a simple backspace removes the whole text if required, as happens in the Data window. Is it possible to programme this somehow?
  3. Also, as a related question, is it possible to control where the cursor sits when a window is opened? I have tried nominating the field, but this seems to work in the Data window, not on a form…
  4. Using multiple databases, as I am, Panorama X seems to become confused about which database is active. It seems, at times, to use the Data window that is furthest to the front, rather than the database attached to the form that is active. This leads to buttons not executing properly, because it says there is no field named “whatever”, because it is referencing the incorrect database. This is minor annoyance value to me, and I can get around it by shifting around windows, but I hope that future versions of Panorama will iron out this bug.
  5. The print programming doesn’t seem to be properly supported. It will print what I have asked, but no further steps in the programme are executed, and it jumps to the data window for the database, rather than the form I was working on.
  6. I have grouped Text Edit objects together in forms to have the tab sequence correct. However, if I include a search field, linked to a search variable, the grouping seems to upset the proper recognition of that variable. Simply fixed by ungrouping the objects, but took me a bit of time to establish the problem…

Overall, I’m really happy with the end result.
Thanks again, for any help or comments re the above issues.

I’ve had the same problem. I set a Hot Corner in System Prefs>Screen Saver to Disable Screen Saver. Then, in SystemPrefs>Energy Saver, set the display sleep setting to Never. That holds it open forever.

You can set another Hot Corner to put the computer to sleep whenever you want.

Panorama doesn’t get confused on its own but you will confuse it if you click in Window A while it’s working in Window B.

Thanks for the hot spot advice - I have set that up.

I’m not sure your observation about confusion and windows matches my
situation, but I’ll certainly pay attention, and see if this is what is

I’ve also found sleep messes with lengthy procedures. I use a little freeware app, Caffeine, which sits in the menubar and lets you block sleep as needed. It’s scriptable so I start long procedures by sending it an applescript to block sleep and end them by sending another to reenable it. Then I don’t have to remember to park my mouse in a hot corner.

Thankyou. That sounds perfect. I only dabble in progamming through
necessity, and have never used AppleScript. My mother can probably help me
here, but if you’d be happy to share the actual wording you use, it would
save me some experiementation…

Regarding #5 and how print programming functions, I have experienced the same issue. Printing always stops code execution for me. As such, I am using the following steps to open a form for printing (this may be silly but it works for me):

I assign the window’s name to a local variable called “firstWindow” and open a print preview of the form. To prevent the code execution from ending and pull focus back to Panorama X, I use the Message command.
Finally, I bring the form back into focus and close it.

local firstWindow

OpenForm "Form Name"
Message "Print Preview was opened. Click OK to return."
Window firstWindow

Fantastic. Really appreciate the information. Thanks

I love the idea of getting your Mum to write your AppleScript code!

This is a known bug, which seems to be a bug in Apple’s code. I am hoping to discuss this with Apple engineers next month when I attend WWDC.

If you want to print in a program, you may want to use the printtopdf statement. This can either print to a PDF file, or directly to a printer. It allows the program to control the options normally set by the print dialog, like scale, orientation, etc.

This applescript is easy, some are not.

    tell application "caffeine"
        turn on
    end tell

This turns on Caffeine and thus turns off sleep. To do the reverse, change ‘on’ above to ‘off’. You can option-click Caffeine’s coffee cup menubar icon to see its preferences and there set it to automatically start at login.

From PanoramaX’s standpoint this could be done all on one line, but my extra white space makes it easier to see and understand the Applescript code PanX’s Applescript statement is invoking. The double pipes ( || ) are just a different variety of quote. The name of the application, caffeine, needs to be quoted in a way Applescript’s language understands and PanX’s Applescript statement’s argument needs to be quoted, so a different variety of quote is needed for the latter. PanX allows for several types of quotes, cf. Quotes under its Help.

Thankyou very much. I look forward to giving this a try.
(and I love the name ‘caffeine’ for the app - especially given my comment about going to get a coffee while the programme is running…)

The simple way: Use macOS System Preferences > Save Energy Settings.

Whenever I am worrying that system sleep could cause conflicts with longer tasks — e.g. during a Carbon Copy Cloner backup —, I set computer sleep to 3 hours or to Never and disable sleep for hard disks.

As a reminder to get back to the standard settings when the task is done, I minimize the System Preferences window into the dock.

Of course sleep settings can be adjusted via the Apple provided app, System Preferences. And fancier options are available there. But just clicking a menubar coffee cup full is pretty easy for manual tasks, like backups, with which sleep interferes.

But although System Preferences offers rudimentary Applescript support I don’t see in its Applescript dictionary anyway to change sleep settings. Caffeine’s applescript support is also limited but it can be turned on or off via script or have its status reported via script. So I can automate turning sleep off for repeating procedures without any additional effort. And, if I want, rather than always turning Caffeine off at the end of the procedure, I can then, with a bit more complex script, restore it to its pre-procedure on/off status.

I suspect sleep settings might also be adjusted via unixshellstring( but I’m not much up on my unix commands. I’ve dabbled with Applescript since it first came out way back in System 7, and the somewhat similar Hypercard before that, so am more comfortable with it than with PanX’s Terminal emulation options, or for that matter its support for yet other scripting languages. But with PanX you can use whatever works for you. Jim’s built in PanX statements or functions for a task are usually the easiest solution, if they exist.