I think what Kel means is the app that gets written out should have a function to get the User input the first time its Run.
Doing that will make you life much easier.
This is the install app. as you see it just installs the second app.
The second app has the function to get the user input the first time around and then use it on further launches.
It does this by using a true and false property
There is room for you to expand on it, I.E have a reset button.
( I do this at work. where I have a script that sets up windows positions for my staff. These have to be just so.
The is a “Reapply” button and a “Save” button. If “Reapply” is clicked the script will set the windows up.
If “Save” is clicked it will Save the current window positions, but only if you enter the correct code first.)
property bugcheck : false
on run
my maker()
end run
on maker()
-- Read the main.scpt
if bugcheck then say "1"
tell application "Finder"
--set Pathz to "Macintosh HD:Users:username:Documents:Script App Installertester.app:Contents:Resources:Scripts:main.scpt" as string -- for testing
set Pathz to ((path to me) & "Contents:Resources:Scripts:main.scpt" as string)
set Pathz to POSIX path of Pathz
set thecat to do shell script "cat " & "\"" & Pathz & "\"" & " "
set AppleScript's text item delimiters to "Script_Start_Point"
set thecat to text item -1 of thecat -- this works from bottom of text to first break point "Script_Start_Point"
set AppleScript's text item delimiters to "Script_End_point"
set script_text to text item 1 of thecat
set AppleScript's text item delimiters to ""
end tell
if bugcheck then say "2"
if bugcheck then say "Added"
-- use "Script Editor" to make the app
my RunMaker(script_text, bugcheck)
end maker
on RunMaker(script_text, bugcheck)
set file_path to (path to desktop as Unicode text) & "MyProperties.app"
set file_path to POSIX path of file_path as string
do shell script "echo " & quoted form of script_text & "|osacompile -o \"" & file_path & "\""
if bugcheck then say "saved"
end RunMaker
-- paste script to be installed as an .app between the "(* Script_Start_Point" and "Script_End_point *)"
-- example below
(*
-- >Script_Start_Point
global theProperties
property processName : {"processName", "Name", ""}
property processQuality : {"processQuality", "Quality", ""}
property processFormat : {"processFormat", "Format", ""}
property processProfile : {"processProfile", "Profile", ""}
property processProfile2 : {"processProfile2", "Profile2", ""}
property processScale : {"processScale", "Scale", ""}
property processRes : {"processRes ", "Res", ""}
property imageWidth : {"imageWidth", "Width", ""}
property imageHeight : {"imageHeight", "Height", ""}
property imagePercent : {"imagePercent", "Percent", ""}
property processSubFolder : {"processSubFolder", "SubFolder ", ""}
property processSubName : {"processSubName", "SubName", ""}
property openAfter : {"openAfter", "After ", ""}
property processWatermark : {"processWatermark", "Watermark", ""}
property processFileIcon : {"processFileIcon", "FileIcon", ""}
property firstRun : true
on run
-- Gather Info
if firstRun is true then
set theProperties to {processName, processQuality, processFormat, processProfile, processProfile2, processScale, processRes, imageWidth, imageHeight, imagePercent, processSubFolder, processSubName, openAfter, processWatermark, processFileIcon}
repeat with i from 1 to number of items in theProperties
set this_item to item i of theProperties
display dialog "Enter : " & item 2 of this_item default answer "" buttons {"Cancel", "Next"} default button 2
copy the result as list to {text_returned, button_pressed}
set item 3 of this_item to "The Property " & item 3 of this_item & " is :" & text_returned & return as string
if button_pressed is "Next" and this_item is processFileIcon then
set firstRun to false
my appz()
exit repeat
else if button_pressed is "Next" then
end if
end repeat
else
my appz()
end if
end run
on appz()
set biglist to ""
theProperties
repeat with i from 1 to number of items in theProperties
set this_item to item i of theProperties
set biglist to biglist & item 3 of this_item as string
end repeat
display dialog biglist buttons {"Cancel", "Ok"} default button 2
end appz
Script_End_point< ---
*)