Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
executing Application Folder function
#1
I put a group of functions that were working into a folder whose properties I changed to "Application". I made sure that the first item in the folder was my main function. However, After that, when I used a windows shortcut (with the same command line as before) to execute the primary function, it went into an endless loop, creating more and more threads of the same function. When I changed the folder back to a non-application property, the application worked fine again.

How do I execute it (and supply the arguments to that first function) through a windows shortcut command line?

thanks, Craig
#2
I tested this situation but it works well. Can you please show the application and command line?
#3
This is the command line, and the first function in the folder is called “QuickBooks” (I’ve repeated it below) If there is nothing obvious in that main function then I can send the other functions. As I said, the system works fine as long as I do not set the folder properties to be “Application”. The other functions called are all executable functions. I found I had to make them executable in order to run them with the mac command and thus have them run asynchronously.

Command Line:

"C:\Program Files\Quick Macros 2\qmcl.exe" M "QuickBooks" A "Admin" "C" "QBW32.exe" "QuickBooks Pro 2004" "QuickBooks Pro" "Zap LLC.QBW" "\Zap" "\Qbooks" "California Sales Tax Rates.txt"

Function called “QuickBooks”:

Code:
Copy      Help
function str'User str'MainDataDrive str'QBexecutable str'QBflavorAndEdition str'IntuitExeDir str'DataFile str'CompanyFolder str'SalesTaxDataDir str'Saletaxdatafile

str ExtSTaxDataDir.from(MainDataDrive ":" CompanyFolder SalesTaxDataDir)
str QBDataFile.from(MainDataDrive ":" CompanyFolder "\Qbooks\" DataFile)
str QBProgFile.from("C:\Program Files\Intuit\" IntuitExeDir "\" QBexecutable)

str WindowName = QBflavorAndEdition

str adminfile.from(MainDataDrive ":" CompanyFolder "\Qbooks\" "admin requests.txt")
if(dir(adminfile))
,mes("Administrator has control of QuickBooks. Try again Later" "Administrator Message")
,end

mac "Run_QuickBooks" "" QBDataFile QBProgFile QBflavorAndEdition User ;;terminates
mac "CustomerData_for_Zap" "" WindowName ExtSTaxDataDir Saletaxdatafile ;;stays resident
mac "send_admin_function" "" adminfile WindowName ;;stays resident

Thanks, Craig
#4
I still not tested it but I think I know why this happens. You cannot launch nonfirst function in app folder in any other way than calling from other functions of that folder. To make debugging easier, when you try to launch a nonfirst function, actually runs first function. So, if you use mac to launch other functions, they must not be in app folder. Drag them out.
#5
I see. I was trying to put them into an App folder so that they could not be launched by mistake (I was unable to make them non-executable because I needed to use them in a "mac" statement to run asynchronously. It's not that important.

It sounds like the entire problem is because of my need to run the non-first functions asynchronously.

Thanks, Craig
#6
;\

A function that begins with space and \ can be launched with mac but does not run when launched using the Run button.

To, hide a function in the popup list, place it in a private folder (check Private in Folder Properties). Anything that begins with __ also will be hidden.
#7
I tried many times to get my functions to run with "mac" but could not as long as I had " \" (space\) in the first line. Then, like magic, as soon as I removed the " \" and made them executable, the whole system worked perfectly. That's why I came to that conclusion. I don't know.

Craig


Forum Jump:


Users browsing this thread: 1 Guest(s)