Normal Topic macro "fails to open" then works? (Read 9270 times)
beagle
Junior Member
**
Offline


No personal text

Posts: 80
Location: australia
Joined: May 28th, 2004
macro "fails to open" then works?
Jan 12th, 2005 at 10:27am
Print Post Print Post  
Hi,

A bit of a query & any advice most welcome.

i'm trying to automate the generation of a report from a menu comand button.

on programing the button with the "on entry" @macro(m1.mac) I get the message "macro m1 failed to open" - on clicking OK, the macro runs & generates the report I want .

Has anyone else come across this ?

Running v1.1

Many thanks in advance
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: macro "fails to open" then works?
Reply #1 - Jan 12th, 2005 at 12:58pm
Print Post Print Post  
Regardless of the macro issue, have you considered using @SelectTreeItem() instead?
http://www.lantica.com/Support/sesame_onesheet_9.html
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
beagle
Junior Member
**
Offline


No personal text

Posts: 80
Location: australia
Joined: May 28th, 2004
Re: macro "fails to open" then works?
Reply #2 - Jan 12th, 2005 at 11:36pm
Print Post Print Post  
Hi,
Thanks for the above, & yes I have considered it & will be trying that approach this evening.

I was really just curious to see if anyone else had seen the above (warning message & then the macro running)

tuvm
  
Back to top
 
IP Logged
 
beagle
Junior Member
**
Offline


No personal text

Posts: 80
Location: australia
Joined: May 28th, 2004
Re: macro "fails to open" then works?
Reply #3 - Jan 13th, 2005 at 8:04am
Print Post Print Post  
Hi Hammer - thanks for the tip

@selecttreeitem works very, very well - much better than @macro (more transportable too!)

A very happy Beagle Grin Grin Grin
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: macro "fails to open" then works?
Reply #4 - Jan 13th, 2005 at 12:49pm
Print Post Print Post  
Quote:
I was really just curious to see if anyone else had seen the above (warning message & then the macro running)


Your @Macro call does npt have quotes around the macro name. It should be @macro("m1.mac"). That's why it's failing. You are then seeing it run because it was probably already loaded from your recording it earlier.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: macro "fails to open" then works?
Reply #5 - Jan 13th, 2005 at 4:15pm
Print Post Print Post  
Does the @macro command look for a path relative to the server or to the client?

I have a macro that fails to run and can't figure out where to save the macro file (client of server?) and then what to call it.

Our server Drive C: is mapped to all clients as drive G:

If I use @Macro("C:\sesame\mymacro.mac") is it looking on the clients G: drive or the clients C: drive?

I run into similar issues with FileOpen and PrintImage, etc.

Is there a general rule of thumb to clear up the confusion?

Thanks,
Steve
  
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: macro "fails to open" then works?
Reply #6 - Jan 13th, 2005 at 4:50pm
Print Post Print Post  
Hello Steve,

In SBasic the File Input/Output commands are local(client).
The Print Form to HTMl is local(client)
Import and Export Programming is local(client)

Everything else I believe is relative to the server.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: macro "fails to open" then works?
Reply #7 - Jan 13th, 2005 at 5:00pm
Print Post Print Post  
Thanks Ray. I'll print that and keep it in my manual.

Steve
  
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: macro "fails to open" then works?
Reply #8 - Jan 22nd, 2005 at 6:29pm
Print Post Print Post  
I had a similar problem and am wondering whether the @macro command is set for a "default" directory.

When I went to install Sesame, I noticed that it defaulted to C:\Sesame

I preferred however to install it in C:\Program Files\Sesame

When I used simply @macro("allrecords.mac") I had the same problem.  If no macro was "loaded" - I got the "macro failed to load" message and the macro did NOT work.  If the macro was "loaded", I got the "failed to load" message and the macro DID work.

When I used the full path @macro("C:\program files\sesame\data\allrecords.mac") it worked just fine.  If I used the full path without the .mac extension I got the "failed to load" message.

One additional question:  Each time I open Sesame the "view" is for macro visibility "ON"  Can I modify this so that it will ALWAYS open with a "view" of macro visibility OFF?"

  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: macro "fails to open" then works?
Reply #9 - Jan 22nd, 2005 at 10:37pm
Print Post Print Post  
Quote:
I had a similar problem and am wondering whether the @macro command is set for a "default" directory.

When I went to install Sesame, I noticed that it defaulted to C:\Sesame

I preferred however to install it in C:\Program Files\Sesame

Sesame looks for macros, and much else, in the "current working directory". In Windows, that is set in the icon's properties and is called the "Start In" path. You can have a different CWD from the directory where the Sesame executables are installed.
Quote:
When I used simply @macro("allrecords.mac") I had the same problem.  If no macro was "loaded" - I got the "macro failed to load" message and the macro did NOT work.  If the macro was "loaded", I got the "failed to load" message and the macro DID work.

Just wrote a new SBasic command that "unloads" a loaded macro. It will be in the next release.
Quote:
When I used the full path @macro("C:\program files\sesame\data\allrecords.mac") it worked just fine.  If I used the full path without the .mac extension I got the "failed to load" message.

The @macro command does want the file extension. You can name a macro file with any extension you want, so we cannot assume the .mac extension. If the macro file is in the CWD ("Start In" directory), you do not need the full path.
Quote:
One additional question:  Each time I open Sesame the "view" is for macro visibility "ON"  Can I modify this so that it will ALWAYS open with a "view" of macro visibility OFF?"

When I read this, I thought - sure there is... but I checked, and there is no startup switch for this. I'll try to get it in the next release. I thought I put it in when I put in the "-blink" switch, but I guess I missed it.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged