Implementation script automatically to the user's preferences

Hello fellow Scripting Guys!

This question of the month - this - is it possible for Illustrator JS to go and enter the user name that is connected to a computer or even the computer ID?  At this time, I created a login system that people use when they turn first on illustrator who then go and load the correct scripts on a pallet for this user to use, but if I can have this happens automatically, I can create pallets pregenerated for each user and it have it catch once illustrator is started to save some of the initial load by user time (about 8 people).

Right now my login scripts looks something like this;

if (globalartistname == null)
    {
        globalartistname = prompt ("enter your artist initials");
        }//end if null
   
                //alert ("You user name is --  " + globalartistname)
switch (globalartistname)
                 {
                
                 case "Name1":
                 case "Name1_Lowercase":
                
                     var saveName = new File ("DESKTOP" + filename);
                    
                  var thisDoc = app.activeDocument;
                  if ( app.documents.length > 0 )
                  {
              
                    saveOpts = new PDFSaveOptions();
                    saveOpts.compatibility = PDFCompatibility.ACROBAT6;
                    saveOpts.generateThumbnails = true;
                    saveOpts.preserveEditability = true;
                    thisDoc.saveAs( saveName, saveOpts );
                    }
                    
                    break;
                
                 case "Name2":
                 case "Name2_Lowercase":
                
                 //alert ("made it to CEL");
                
                    saveFileToPDF();
                    break;
            
            
                  case ( "Name3_version1" || "Name3_Version2" || "Name3_Version3"):
                
                     var saveName = new File ("DESKTOP" + filename);
                    
                  var thisDoc = app.activeDocument;
                  if ( app.documents.length > 0 )
                  {
              
                    saveOpts = new PDFSaveOptions();
                    saveOpts.compatibility = PDFCompatibility.ACROBAT6;
                    saveOpts.generateThumbnails = true;
                    saveOpts.preserveEditability = true;
                    thisDoc.saveAs( saveName, saveOpts );
                    }
                    break;
            
                 case "Name4":
                 case "Name4_Lowercase":
                
                 //alert ("made it to AJH");
                
                     saveFileToPDF();
                    break;
            
                 case "Name5":
                 case "Name5_Lowercase":
                
                     saveFileToPDF ()
                    break;
            
                 case "Name6":
                 case "Name6_Lowercase":
                
                     saveFileToPDF ()
                    break;
            
                 case "Name7":
                 case "Name7_Lowercase":
                
                     saveFileToPDF ()
                    break;
            
                 case "Name8":
                 case "Name8_Lowercase":
                
                     saveFileToPDF ()
                    break;
                 }//end switch
                
               }//end if app open 
           }//end function savetoPDF

The above is a code snippet in a much larger file, I since the installation of the scripts to not be case-sensitive, but if I can enter this information on the linen which would save loads of time and avoid mistakes in the future.  Names and places have changed for security reasons.

Use $.getenv ("USERNAME") on Windows or $.getenv ("USER") on mac

And $.getenv ("COMPUTERNAME")

Tags: Illustrator

Similar Questions

  • How to choose the download location? download automatically to the users in c drive folder. I want to change it... Please help me...

    How to choose the download location? download automatically to the users in c drive folder... I want to change my office... Please help me out...

    Tools-> Options-> save-> click on the Browse button and find the folder where you want to save the files.

  • Adobe Story in error "cannot load the user's preferences" then I have to disconnect

    I try to access Adobe Story, but whenever I connect I get an error saying "Cannot load the user's preferences", then I have the ability to log out, but nothing else. I tried this using the desktop application as well as several browsers on my Mac and my PC. I tried to raise that this issue with the chat support however could not help with the issue. What can I do to solve this problem and power access to my account?

    Hello

    Can you please try again? He still does not?

  • Error "unable to get the user's preferences.

    Whenever I try to connect, I get an error saying "Unable to obtain the user's preferences", and then I get disconnected.  I can't use the history or even access my files on it.

    Seems that a lot of people have this problem goes all the way back for 2012!  Nobody has been able to help me with the support of the conversation and when I called they told me to wait 48 hours... 4 days later still nothing.


    Please can anyone help solve this problem?

    Are you able to connect to the web application in history (@ https://story.adobe.com )?

    Can you please also send us your login by email to [email protected] id?

  • Is there a way to get the Audio to load and play automatically when the user turns the page?

    I am creating a musical application and I would like a sample of the audio play when the user opens a page. I use Indesign CC and building an app for iOS. I didn't know the function that allows me to do this? If anyone knows the answer, I would be very grateful.

    Thank you

    If you use DPS you can add the audio file in the Panel inlays Folio select Audio/video and enable automatic playback.

    See our help section at http://helpx.adobe.com/digital-publishing-suite/help/audio-video-overlays.html for more information.

    Neil

  • Need a script to alert the user to fill in another field

    Hello

    I have a drop-down list labeled certifications. In fact, I have 9 of them. called certifications1 and so on. Anyway I need something that detects if the user selects the Bill called pro forma menu item that has a small window reminding them to ensure that Receivers and e-mail name is entered. That's all I'm looking for. Thanks in advance!

    Hello

    According to your drop-down setting, there are two different ways to refer to the modified value.

    If you use only 'list items' scripts will be;

    If (xfa.event.newText == "proforma invoice") {}
    xfa.host.messageBox ("make sure that the name and email is entered");
    }

    If you use "Element to specify values" with "items in the list", the scripts will be;

    If (this.boundItem (xfa.event.newText) == '1') {}
    xfa.host.messageBox ("make sure that the name and email is entered");
    }

    both scripts will change event of falling down into javascript.

  • Automatically display the user information

    So I'm working on this website of the school project, it's a pretty simple site in Dreamweaver. I created a log in the site and I use MM_Username to show the connected to the user. How can I go to show information of the user (name, first name, telephone number etc.) on a wall that they display all sorts of different things in (to sell, animals lost, happening, etc.

    Thanks in advance!

    With queries SQL table names & field desired database.

    I hope that you do not use the obsolete Server & database for this panels.

    Nancy O.

  • How to make a video play automatically when the user gets to a certain point/pixel?

    I am creating a Web site with an embedded video using the YouTube widget. I want the video to start playing when the upper part of the widget reached the top of the screen, in this case to 400 pixels. Can anyone help? Thank you in advance!

    You will need to use a suitable script that triggers the YouTube Player.

    Mylenium

  • Script to remove 30 days turned off of the guest virtual computer in vCenter automatically and the user on this subject by e-mail

    Hi all

    I'm looking for a script that can automatically remove power vm comments which have been stopped for more than 30 days off. Now I'm under this

    $IgnoredVMs = "windows7."

    $vms = get - VM | Name - descending sort

    foreach ($vm to $vms)

    {

    $DecommedVMs = ($vm |) Where {$_.} PowerState - eq "PoweredOff"} | Where {$_.} Name - notmatch $IgnoredVMs} | Select Name, LastPoweredOffDate). Sort - Object - property LastPoweredOffDate)

    }

    and then I run it manually

    Remove-vm $DecommedVMs - deletepermanently

    Things, it is that I have more than 1000 comments vm in my environment and we create & many virtual shutdown invited every day. And since we have a retention period of 30 days per vm we cannot remove them as soon as they stop. So I'm looking for a script that verifies any vm guest that is off for more than 30 days and remove them automatically automatically and e-mail user guest vm is eliminated.

    Thank you

    Rama

    Try something like this

    $vms = Get-VM | where {$_.PowerState -eq "PoweredOff"}$vmPoweredOff = $vms | %{$_.Name}$events = Get-VIEvent -Start (Get-Date).AddDays(-30) -Entity $vms |   where{$_.FullFormattedMessage -like "*is powered off"}$lastMonthVM = $events | %{$_.Vm.Name}$moreThan1Month = $vmPoweredOff | where {!($lastMonthVM -contains $_)} 
    
    $moreThan1Month | Remove-VM -DeletePermanently -Confirm:$false$vmNames = $moreThan1Month | Select -ExpandProperty Name
    
    Send-MailMessage -From [email protected] -To [email protected] -SmtpServer [email protected] `-Subject "Removed $($moreThan1Month.Count) VM" -Body ($vmNames | Out-String)
    
  • Pass the protected script that allows the user to edit the content

    I work with a number of local groups but get busier with my schedule, I can't take the time to do the weekly band concerts or hourly updates. I saw a script a few years ago, allowing an end user (the band) to change their own webpage (in particular, the page of the annex). It is password protected so that only you can access the configuration of the page with the appropriate authorization. I forgot since the code and can't seem to find one similar to it. The unfortunate side effect was the page was very simplistic and did not much markup.

    Does anyone know of a code or a script like this?

    Thanks in advance.

    Anurag,
    That's what I have in mind. I'm a programmer/designer old enough, when I started writing code, it was all by hand and the concept of the CMS is really new to me. I've seen a few articles about it but did not know about the process. I definitely take your advice and looking around sourceforge and some other resources. The idea of the timetable is a good starting point, and I think that will be what I'm after.

    Thanks for the advice,
    Txwebman

  • Chargers Script conditional and the user interface.

    I was wondering if someone could help me.


    So I made a gallery looking a file say "ephoto0?" ('? (' being a natural number).


    I made sure when I hit the button FOLLOWING (nexteurope_btn) it adds a value of 1 '?'

    and when I hit RETURN (backeurope_btn) he subtracts the value 1 to '?' (by ephoto01, 02, 03, etc)


    My problem is the creation of a loop to the first frame to the last. He just keep adding 1 and not finding the next file with this value and vice versa.


    I think that the correct script would be an IF statement that would state that If the integer value gets 9 GB to start or something like that. I'm new to AS and I realize that can be an innefficient way of going about it, but it is better that I thought. However I can't to write a script that fills As.


    Any help would be appreciated. Script follows below.

    nexteurope_btn.addEventListener (MouseEvent.CLICK, nextImage);

    variable is a container that contains a value...

    var imageNumber:Number = 1;

    function nextImage(evtObj:MouseEvent):void {}

    adding to the current value + 1

    imageNumber ++;

    europeImageLoader.source = ' graphics/ephoto0' + imageNumber + ".swf" ;}

    backeurope_btn.addEventListener (MouseEvent.CLICK, P:System.Windows.Forms.datavisualization.charting.series.backimage)

    function backImage(evtObj:MouseEvent):void { }

    2 subtracted from the current value

    -imageNumber;

    europeImageLoader.source = ' graphics/ephoto0' + imageNumber + ".swf";

    }

    Hello

    Guy in practice, practice

    There are many examples here, when dealing with loading external files.

    Just do a quick search and you will find...

    Why you use the suffix ".swf"? Thought you were

    with images...?

    In any case... Here is a simple and fast loading of an external file example...

    Call the function loadimages--> Loadimages() (Imagefile);

    public function set loadImages(st:String):void
    {
    var ul:URLRequest = new URLRequest (st);
    var ldr:Loader = new Loader();
    ldr.contentLoaderInfo.addEventListener (Event.COMPLETE, onLoaded);<--- calls="" the="" onloaded="" function="" when="" finished="">
    LDR. Load (UL);
    }

    function onLoaded(evt:Event):void
    {
    -Evt.target.content - allows you to retrieve the image

    trace ("Loaded");

    Remove the eventListener COMPLETE when finished
    evt.target.removeEventListener (Event.COMPLETE, onLoaded);

    Now call Loadimages() (filename) to load the next file...

    Use the conditional to check if all the files have been loaded

    If Yes... Don't call onLoaded again...
    }

    Best regards

    Peter

  • Prevent automatic Expansion of the users folder

    It is a loss of a lot of time for me.  When opening explores, it automatically expands the users folder that I can navigate and collapse to get to where I really want to go.  How can I disable this annoying behavior?

    Go to start / computer and you will have a view that is not developed (at least mine isn't) - it shows C:\ and does not yet show the subfolders as users.  Or if you want just your own profile information, click on and it will give you just the files and folders in your profile (not developed).

    I hope this helps.

    Good luck! Lorien - a - MCSE/MCSA/network + / A +.

  • Automatic supply after the creation of the user

    Hello

    I trust reconciliation set up by IOM, it works very well and users are created. I also have an object resource I want to be configured automatically when the user is created in the IOM.
    How to configure the automatic supply of a resource in IOM?


    Thanks in advance!

    Hi Magnan,
    You need
    1 create an access policy for this particular RO
    2. associate this access to the Group policy that is to say all users group by default user are created in this group not sure of the name.

    I hope this help you
    Concerning
    VM

  • Asking the user to select a file path to record data to

    Hello

    To improve the 'user interface', and the usability of my VI, I would like to have the dialog box "select file path" appears automatically, rather than create a user by clicking on an icon on the front panel to display the path of the file dialog. The 'order' of operations would be as follows:

    VI implementing--> Dialogue request to the user the name of the file--> VI adds automatically it appropriate extension--> traditional dialog windows 'save file' opens to allow the user to select the appropriate folder to save the file in--> rest of VI runs.

    I have everything other works independently to obtain registration of the file dialog is displayed automatically. Currently, the only way I can do that is to have the user to select the folder to save ahead to launch through the façade, but would like to remove this step and as soon as they clicked 'OK' on the previous dialog (file name request) have the "Save file/select the folder" dialog appear.

    Thank you

    I think you are looking for the file Express VI dialogue. Be sure to post if this isn't what you're looking for.

  • Redirect to the user interaction

    Hi all

    I have a workflow as you can see in the attached picture. According to a user interaction that I would either like to redirect the user to another intervention by the user or cancel the workflow. I was hoping to do that with a script task, but I failed again. Is it possible to automatically redirect the user to this second user intervention? Otherwise, the user must click the link in the email again, which is very indirect.

    Thank you very much.

    I think you could do a composite interaction and show/hide the presentation of 'second interaction' part based on decision criteria.
    And when you have finished the presentation, you make the decision to cancel or continue, or not based on the entry of user or what criteria.
    This is what I suggest, out of real-world context.

    Good luck!

Maybe you are looking for

  • Satellite A100-680: PnP BIOS Extension missing driver

    I searched for about one hour now, other threads from reading and the search manually through the database of the driver, but I can't find any useful information. As you can see from the following screenshot...[http://img528.imageshack.us/img528/3171

  • Fund Manager degraded

    I need to be able to affect a Fund Manager, and the background should have the following properties: 1. rounded corners 2 gradient color - grey white 3. being able to have arbitrary height because I don't have a fixed number of items, I will show tha

  • Bluetooth does not [HP ENVY m6-1225dx]

    There is not any bluetooth option sub inside the pc and device option and there is no any driver for bluetooth on the Device Manager.  If someone suggest me please use driver or possible solution.

  • HP Envy 4500: Printer connected to the network; laptop computer connected to the network; laptop cannot find the printer!

    I searched through the forums and read a few threads about similar questions, but do not yet have a solution to my problem.  The printer is connected to the network (even printed page "Congratulations, you're connected" with all the relevant informat

  • Card of formulation - UPDATING features of menu items

    Hello. We would like to add a new button in the box tools (say after the 'Settings' button) in the form of wording to make the refresh rate formulation.The option REFRESH the item menu is available when the specification of the formulation is in EDIT