Jump to content
roza

create new folder

Recommended Posts

On 2016. 8. 23. at 0:39 AM, Martino1983 said:

Hi, the workflow doesn't work for me (Alfred 3.1). 

The error message is "[2016-08-22 17:34:15][ERROR: action.script] 0:135: execution error: Alfred 3 ha trovato un errore: "j new folder " non è in grado di capire il messaggio “«event alf2Sear»”. (-1708)".

 

Can you help me?
Thanks in advance. 

Martino

 

same here.

it doesn't work with Alfred 3.1 and Sierra

Share this post


Link to post
On 10/9/2016 at 4:38 PM, Mahmud Lee said:

 

same here.

it doesn't work with Alfred 3.1 and Sierra

 

I am pretty new to alfred workflows. Can anyone tell me, what this alf2Sear is? Is it an internal handler? Where is it documented? The error seems to appear in this script file: 

 

on run argv
	
	set wf to load script POSIX file (POSIX path of ((POSIX file ((POSIX path of (path to me)) & "/..") as text) & "workflow.scpt" as text) as text)
	set wf to wf's new_workflow_with_bundle("com.sztoltz.newfolder")
	
	set sArgv to argv as text
	set someSource to {}
	
	if sArgv contains tab then
		set {TID, text item delimiters} to {text item delimiters, tab}
		repeat with i from 1 to the number of text items of sArgv
			set end of someSource to text item i of sArgv
		end repeat
		set AppleScript's text item delimiters to TID
	else
		set end of someSource to sArgv
	end if
	
	wf's set_value("alf_files", someSource, "settings.plist")
	tell application "Alfred 3" to «event alf2Sear» "❊ new folder "
	
end run

 

Share this post


Link to post
19 hours ago, deanishe said:

It looks like the internal name for the Alfred 2 search command. Change it to tell application "Alfred 3" to search "..."

 

Ah, thank you. That's it - the Workflow works again :)

 

For other readers: You have to change following things to make it working in Alfred 3: 

 

1: in the file workflow.scpt change the numbers marked bold to "3"

 

set my _cache to (my _home) & "/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/" & (my _bundle) & "/"
set my _data to (my _home) & "/Library/Application Support/Alfred 3/Workflow Data/" & (my _bundle) & "/"

 

2: in the file nf_01.scpt change the line 

 

tell application "Alfred 2" to «event alf2Sear» "❊ new folder "

 

to 

 

tell application "Alfred 3" to search " new folder "

Edited by lycopodiopsida
error in code

Share this post


Link to post
On 24.11.2016 at 9:34 AM, lycopodiopsida said:

 

Ah, thank you. That's it - the Workflow works again :)

 

For other readers: You have to change following things to make it working in Alfred 3: 

 

1: in the file workflow.scpt change the numbers marked bold to "3"

 

set my _cache to (my _home) & "/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/" & (my _bundle) & "/"
set my _data to (my _home) & "/Library/Application Support/Alfred 3/Workflow Data/" & (my _bundle) & "/"

 

2: in the file nf_01.scpt change the line 

 


tell application "Alfred 2" to «event alf2Sear» "❊ new folder "

 

to 

 

tell application "Alfred 3" to search " new folder "

 

Thanks, I did everything you suggested, but it still does not work for me (Alfred 3.2.1, El Capitan 10.11.6).

 

I get the following message in debug mode, which seems to be odd:

 

[2016-12-30 09:58:38][trigger.action] Processing output of 'action.script' with arg '(

    "/Users/myuser/Desktop/NeuerOrdner/4.txt",

    "/Users/myuser/Desktop/NeuerOrdner/5.txt"

)'

[2016-12-30 09:58:38][ERROR: action.script] 0:169: execution error: Dieses Skript scheint kein AppleScript-Skript zu sein. (-1752)

 

 

The error-message translated to English means "Script doesn’t seem to belong to AppleScript."

 

Apart from changing things suggested, I did not change anything.

 

Does anyone has an idea? Thanks ...

 

Share this post


Link to post
20 minutes ago, deanishe said:

Did you edit the script in Script Editor?

 

No, first I used a plain text editor (Textmate 2 in Apple Script mode).

 

I now changed the script using the script editor, and now it perfectly works (have no idea what the difference is...)

 

Thanks a lot for your help!

Share this post


Link to post

.scpt files are compiled scripts, i.e. they're not text files. If you save an AppleScript as text, you should use the .applescript extension, not .scpt

Share this post


Link to post
9 hours ago, deanishe said:

.scpt files are compiled scripts, i.e. they're not text files. If you save an AppleScript as text, you should use the .applescript extension, not .scpt

 

I did not know that. They appeared to me as normal text files - but that's clear now. Thanks for the explanation, much appreciated!

Share this post


Link to post

I guess I phrased that wrong. The .scpt extension is for compiled scripts, .applescript for text files. Otherwise bad things happen.

Share this post


Link to post
On 4/20/2013 at 12:11 PM, Carlos-Sz said:

 

David was faster!

 

Anyway, here is my approach considering your suggestion:

 

  • Right now it works as an Alfred File Action only
  • Select the files in Alfred browser, select “To New Folder” action then one of the 3 options below (move, copy or only create a new folder):

tnf_01.png

 

Downlaod now

 

@Carlos-Sz Is there any way you could post your workflow again (re: file action to move files to a new folder)? The previous link no longer works. Thanks for your help!

 

Or, of others have an updated version, that'd be great, too. Thanks!

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...