Action

Select Action Group

Posted by Garbonsai, Last update 27 days ago

Prompt to select from a list of available Action Groups, and load the selected action group.

Steps

  • script

    // select from a list of workspaces and load
    let f = () => {
    	let groups = ActionGroup.getAll();
    	if ( groups.length == 0 ) {
    		alert( 'No action groups defined.' );
    		return false;
    	}
    	
    	let p = Prompt.create();
    	p.title = "Select Action Group";
    	
    	for ( let g of groups ) {
    		p.addButton( g.name );
    	}
    
    	if ( !p.show() ) {
    		return false;
    	}
    
    	let group = ActionGroup.find( p.buttonPressed );
    	app.loadActionGroup( group );
    	app.loadActionBarGroup( group );
    }
    
    if ( !f() ) {
    	context.cancel();
    }

Options

  • After Success Default
    Notification Error
    Log Level Error
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.