Jump to content

Will-i-am

Member
  • Posts

    12
  • Joined

  • Last visited

Posts posted by Will-i-am

  1. This is great thank you.. :) 

    One small question how can I configure it to use iCloud, Now all notes are going to gmail notes?? 
    Thank you, 

     

    Cheers ヅ,
    Bill 
    Tuesday, October 20, 20156:56 PM
  2. I created a workflow to search in a specific folder when I select a file and then will show in finder window.
    Now I would Like to be ask if I would like to open it or show in finder?  Any ideas? 
     

    Cheers ヅ,
     
    Bill 
    Monday, October 19, 201512:11 PM
  3.  

    Hopefully the explanation helps.

     

    I did decide to make it a script filter rather than using an Applescript input box because it makes it easier to manipulate the values quickly and see the results.

     Once Again Thank you Shawn you have been very helpful.  :)

  4. I re-coded it in PHP and dropped it in a simple workflow that you can download here: https://www.dropbox.com/s/hihr5zl054wdq5u/Roman%20Date.alfredworkflow?dl=0.

     

    It works as a script filter and uses PHP's date parser, so you can do things like "rd now" and "rd tomorrow" and "rd next friday" and "rd -1000 years" as well as "Oct 29 1993" or "10/29/1993".

     

    Currently, if you press enter, it just displays it as large text.

     

    Thank you Shawn, it works great Now I got to figure out how you did it and work on my PHP coding... 

     

  5. Hello,

    I not good at all in Applescripting and I would like to utilize  the large text display in Alfred. Also my coding is a bit sloppy... Any suggestions would be great.  

     

    I am making a workflow to convert a date into roman numeral date. Once done will be posting the finished results.. 

    on alfred_script(q)
    try
    	tell (current date)
    		set yearInt to its year
    		set monthInt to its month as integer
    		set dayInt to its day
    	end tell
    	
    	set defaultDateString to (dayInt &  monthInt & yearInt) as text
    	
    	tell current application
    		set userDateString to text returned of (display dialog "Enter a date of the form: DD/MM/YYYY" with title "AppleScript By Christopher Stone" default answer defaultDateString as text)
    	end tell
    	
    	if userDateString ≠ defaultDateString then
    		set AppleScript's text item delimiters to "/"
    		set {dayInt, monthInt, yearInt} to text items of userDateString
    	end if
    	
    on error e number n
    	set e to e & return & return & "Num: " & n
    	if n ≠ -128 then
    		try
    			tell current application to button returned of ¬
    				(display dialog e with title "ERROR!" buttons {"Copy Error Message", "Cancel", "OK"} ¬
    					default button "OK" giving up after 30)
    			if ddButton = "Copy" then set the clipboard to e
    		end try
    	end if
    end try
    
    
    try
    	
    	set RomanYear to ""
    	repeat with i from 1 to (count (yearInt as string))
    		set RomanYear to item (((item -i of (yearInt as string)) as integer) + 1) of item i of ¬
    			{{"", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX"}, ¬
    				{"", "X", "XX", "XXX", "XL", "L", "LX", "LXX", "LXXX", "XC"}, ¬
    				{"", "C", "CC", "CCC", "CD", "D", "DC", "DCC", "DCCC", "CM"}, ¬
    				{"", "M", "MM", "MMM"}} & RomanYear
    	end repeat
    	set RomanMonth to item monthInt of {"I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XII", "XII"}
    	set RomanDay to item dayInt of {"I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII", "XIII", "XIV", "XV", "XVI", "XVII", "XVIII", "XIX", "XX", "XXI", "XXII", "XXXII", "XXIV", "XXV", "XXVI", "XXVII", "XXVIII", "XXIX", "XXX", "XXXI"}
    	set the clipboard to RomanDay & "-" & RomanMonth & "-" & RomanYear
    	
    	display notification RomanDay & "-" & RomanMonth & "-" & RomanYear with title "Roman Numerles set to Clipboard" sound name "Submarine"
    	
    on error e number n
    	set e to e & return & return & "Num: " & n
    	if n ≠ -128 then
    		try
    			tell current application to button returned of ¬
    				(display dialog e with title "ERROR!" buttons {"Copy Error Message", "Cancel", "OK"} ¬
    					default button "OK" giving up after 30)
    			if ddButton = "Copy" then set the clipboard to e
    		end try
    	end if
    end try
    end alfred_script
    

    Much appreciated,

    Bill

     

×
×
  • Create New...