Today I am getting a lot of requirement from my production team. Now the have a very tedious requirement.
As user will open InDesing Application it will ask for his employee_code of three character.
Sippose the user enter code “IHK”–Program should check of three character
After entering code there are a lot of files at “MAC HD:Rajeev:DataFiles:” with file name “employee_code.mrk” e.g. IHK.mrk should be moved in the “OSX > Library > Application Support > Adobe > PrintSpt” location.
I know you people can do it. And I am thanking all of you in Advance.
You probably want to launch a script which would ask for the employee code. Then using the finders controlls duplicate the “.mrk” file to the Adobe application support folder. Use duplicate so that the next time it is run there is still the original “.mrk” file to copy into the application support folder. The last like would be to launch InDesign. I’m not sure what this file is, I dont have one in my Adobe Application support folder, so I can’t test this. If it is a file that is updated when InDesign quits, like a preferences file, then you might want to have the script update the previous .mrk file into your data folder and deleting it from the application support folder before begining the process for the new employee.
For printing purpose you can ceate a PMD (Printre’s Mark Definition) file with extension “.mrk”.
I will mention the emp_code of the employee in this file, so that it get printed at the bottom of every page.
In case if you have any problem feel free to get back to me.
Now please see the code below
tell application "Finder"
set EMP_CODE to text returned of (display dialog "Please enter your code" default answer "XXX") as string
if EMP_CODE is not string then
display dialog "Invalid Code Entered"
end if
end tell
I want to chek if user will input any interger type value, it give three try and after three try, it terminate the program