Jump to content

Recommended Posts

In the Script Filter, when you build the XML (for example <item arg="$MACHINE" valid="yes">).

I just added the uid attribute to every item and it worked (<item arg="$MACHINE" valid="yes" uid="$MACHINE">)

 

OH ... So am I to assume perhaps that you are not using Alfred 2.0.3 (186) released yesterday? That is one of the changes in 2.0.3 ... unique IDs

Link to comment

Hey, your official release, nice!
I like the information about resolution you added to graphics.

 

 

It works well on my machine except for not showing the 'System' properly - no text and no icon.
mymac.txt is empty and there is no mymac.png

 

I guess my Snow Leopard is getting really old. Don't worry about my issues, I ordered OS X Lion yesterday ;)

 

17.04.13 22:18:55 [0x0-0x44044].com.runningwithcrayons.Alfred-2[305] Domain com.apple.SystemProfiler.plist does not exist
17.04.13 22:18:56 [0x0-0x44044].com.runningwithcrayons.Alfred-2[305] Error 9: cannot perform functions on files because no destination dir was specified
17.04.13 22:18:56 [0x0-0x44044].com.runningwithcrayons.Alfred-2[305] Try 'sips --help' for help using this tool
17.04.13 22:18:56 [0x0-0x44044].com.runningwithcrayons.Alfred-2[305] cat: SPDisplaysDataType: No such file or directory
17.04.13 22:18:56 [0x0-0x44044].com.runningwithcrayons.Alfred-2[305] cat: SPDisplaysDataType: No such file or directory
17.04.13 22:18:56 [0x0-0x44044].com.runningwithcrayons.Alfred-2[305] /bin/bash: line 118: [: ==: unary operator expected
17.04.13 22:18:56 [0x0-0x44044].com.runningwithcrayons.Alfred-2[305] /bin/bash: line 122: [: ==: unary operator expected
17.04.13 22:18:56 [0x0-0x44044].com.runningwithcrayons.Alfred-2[305] /bin/bash: line 126: [: ==: unary operator expected
17.04.13 22:19:33 [0x0-0x44044].com.runningwithcrayons.Alfred-2[305] /bin/bash: line 15: [: too many arguments

 

I've got com.apple.SystemProfiler.plist in ~/Library/Preferences but the content did not look like you could use it for what you are doing...

 

As for the issue of Scott and Jonathan: They might not use the latest version of Alfred.

Link to comment

Scott and Jonathan: do you have this file? "~/Library/Preferences/com.apple.SystemProfiler.plist" I am accessing this file to obtain the human readable system and the last digits of the serial number. 

 

I have it:

 

 

scott@Tantive-IV { ~ } [!556]  ->  ls -l ~/Library/Preferences/com.apple.SystemProfiler.plist
-rw-------  1 scott  staff  183 Apr  3 17:06 /Users/scott/Library/Preferences/com.apple.SystemProfiler.plist
Link to comment

Oh... right. I forgot about yesterday's update because it was in pre-release.

Updated and works nice now =D.

 

P.S: Sorry ;)

 

No need to be sorry ... I perfectly understand that some folks do not want to 'live on the edge' when it comes to certain things. I actually had no idea it would 'break' the workflow by removing UIDs ... I was simply trying to remove as much as I could from the workflow to streamline ... having BASH generate 6 UIDS and plopping them in takes up milliseconds of time ... that some folks WILL notice!

Link to comment

Dumb question how do you enable pre-releases to update?  I'm not finding the option.

 

Reload the alfred preferences if open ... then, when opened again, there should be a pre-release selection near the bottom ... if I remember correctly.

Link to comment

Hey, your official release, nice!

I like the information about resolution you added to graphics.

 

 

It works well on my machine except for not showing the 'System' properly - no text and no icon.

mymac.txt is empty and there is no mymac.png

 

I guess my Snow Leopard is getting really old. Don't worry about my issues, I ordered OS X Lion yesterday ;)

 

17.04.13 22:18:55 [0x0-0x44044].com.runningwithcrayons.Alfred-2[305] Domain com.apple.SystemProfiler.plist does not exist
17.04.13 22:18:56 [0x0-0x44044].com.runningwithcrayons.Alfred-2[305] Error 9: cannot perform functions on files because no destination dir was specified
17.04.13 22:18:56 [0x0-0x44044].com.runningwithcrayons.Alfred-2[305] Try 'sips --help' for help using this tool
17.04.13 22:18:56 [0x0-0x44044].com.runningwithcrayons.Alfred-2[305] cat: SPDisplaysDataType: No such file or directory
17.04.13 22:18:56 [0x0-0x44044].com.runningwithcrayons.Alfred-2[305] cat: SPDisplaysDataType: No such file or directory
17.04.13 22:18:56 [0x0-0x44044].com.runningwithcrayons.Alfred-2[305] /bin/bash: line 118: [: ==: unary operator expected
17.04.13 22:18:56 [0x0-0x44044].com.runningwithcrayons.Alfred-2[305] /bin/bash: line 122: [: ==: unary operator expected
17.04.13 22:18:56 [0x0-0x44044].com.runningwithcrayons.Alfred-2[305] /bin/bash: line 126: [: ==: unary operator expected
17.04.13 22:19:33 [0x0-0x44044].com.runningwithcrayons.Alfred-2[305] /bin/bash: line 15: [: too many arguments

 

I've got com.apple.SystemProfiler.plist in ~/Library/Preferences but the content did not look like you could use it for what you are doing...

 

As for the issue of Scott and Jonathan: They might not use the latest version of Alfred.

 

This is so intriguing to me ... I canNOT fault you for using SL ... I LOVED it ... BUT, think of me over here too! I need to make this work universally. Besides, LION may have similar issues. I'm going nuts here, thinking, MAYBE I should install a virtual SL over here ... maybe sips is different, or a command was added to bash ... it's obvious the plist files are a bit different, but WHERE is the code?! I can't remember, but does About this mac in SL even show the serial number or the model identifier?

Link to comment

No worries, there is no rush. Making something work universally is not easy without access to a lot of different system configurations. We will figure it out.

 

[...] it's obvious the plist files are a bit different, but WHERE is the code?! I can't remember, but does About this mac in SL even show the serial number or the model identifier?

 

If you are talking about the workflow - it works, even the uptime is displayed correctly. Just 'System' is missing and on trying to open support/spec site I end up at http://www.apple.com/support/. Same root cause for both, I guess.

If you meant the actual 'About this Mac' window - you could cycle through OS X version, build and serial number.

 

Maybe you could implement a fallback to the old method of determining the readable name for a system? Let me know if you need more information or how I can help.

alfred_aboutMac.png   alfred_aboutMac2.png

 

My com.apple.SystemProfiler.plist only sports the following keys (with corresponding data of course):

 

<key>NSNavBrowserPreferedColumnContentWidth</key>
<key>NSNavLastRootDirectory</key>
<key>NSNavPanelExpandedSizeForSaveMode</key>
<key>NSTableView Columns Contents</key>
<key>NSTableView Hidden Columns Contents</key>
<key>NSTableView Sort Ordering Contents</key>
<key>NSWindow Frame SystemProfile</key>
Link to comment

No worries, there is no rush. Making something work universally is not easy without access to a lot of different system configurations. We will figure it out.

 

 

If you are talking about the workflow - it works, even the uptime is displayed correctly. Just 'System' is missing and on trying to open support/spec site I end up at http://www.apple.com/support/. Same root cause for both, I guess.

If you meant the actual 'About this Mac' window - you could cycle through OS X version, build and serial number.

 

Maybe you could implement a fallback to the old method of determining the readable name for a system? Let me know if you need more information or how I can help.

alfred_aboutMac.png   alfred_aboutMac2.png

 

My com.apple.SystemProfiler.plist only sports the following keys (with corresponding data of course):

 

<key>NSNavBrowserPreferedColumnContentWidth</key>
<key>NSNavLastRootDirectory</key>
<key>NSNavPanelExpandedSizeForSaveMode</key>
<key>NSTableView Columns Contents</key>
<key>NSTableView Hidden Columns Contents</key>
<key>NSTableView Sort Ordering Contents</key>
<key>NSWindow Frame SystemProfile</key>

 

OK, First, I THINK I have an idea of how to implement a check on OS Version. I opted for the new method thinking I could remove the check for 11 or 12 characters in the serial number for the system. But I may revert to the older method making the workflow more universal.

 

In Alfred your CPU is displaying 2,2 instead of 2.2 as in your Apple Menu About This Mac. Tiny thing, but it bugs ME. Is that how it's displayed in the "hardware.txt" file beside 'Processor Speed:'?

 

In Alfred it is not displaying your RAM Type at all ... whereas it shows DDR2 in About This Mac. In the "memory.txt" file created by the workflow, IS there an entry for "Type: DDR2"? Or is it called something other than 'Type' beside the DDR2?

 

Temporarily, you can open the text file "mymac.txt" and on line one put 'MacBook (13-inch, Late 2007)' - no single quotes, and on line 2 put the last 3 characters of your serial number (if the serial is actually 11 characters long), or last 4 characters of the serial number if it's 12 characters long. Doing that for now, should fix the top line.

Link to comment

No need to be sorry ... I perfectly understand that some folks do not want to 'live on the edge' when it comes to certain things. I actually had no idea it would 'break' the workflow by removing UIDs ... I was simply trying to remove as much as I could from the workflow to streamline ... having BASH generate 6 UIDS and plopping them in takes up milliseconds of time ... that some folks WILL notice!

 

I simply do the following to generate random uids:

 

T=$(date +"%s")

echo "<item uid='${T}n' ...>!

 

n is just incremented for each result.

 

This should not create any noticable delay.

Link to comment

Works fine now with Alfred 2.0.3. Thanks for this!

 

Only in the first line "System" I have no icon (Mac mini 2009 with 10.8.3).

 

In the file "hardware.txt" create by the workflow, what is the identifier beside "Model Identifier:"? I checked the xml I created and it does in fact have 6 identifiers for MacMini, but perhaps I missed one.

Link to comment

I simply do the following to generate random uids:

 

T=$(date +"%s")

echo "<item uid='${T}n' ...>!

 

n is just incremented for each result.

 

This should not create any noticable delay.

 

Definately another way of doing it. I prefer a one liner "uuidgen" ... it's always random, takes the same amount of time to generate by the system, and a little less 'codey' (if that's a word). I've literally just started using bash/terminal and the likes to 'make' things happen in alfred 2, and personally, when I see a lot of slashes and dollar signs and brackets ... I get a headache ... I mean, I LIKE what awk and see can do for output ... but MAN, I just get a headache sometimes looking at the code bits ... the regex ... LOL.

Link to comment

OK, First, I THINK I have an idea of how to implement a check on OS Version. I opted for the new method thinking I could remove the check for 11 or 12 characters in the serial number for the system. But I may revert to the older method making the workflow more universal.

 

In Alfred your CPU is displaying 2,2 instead of 2.2 as in your Apple Menu About This Mac. Tiny thing, but it bugs ME. Is that how it's displayed in the "hardware.txt" file beside 'Processor Speed:'?

 

In Alfred it is not displaying your RAM Type at all ... whereas it shows DDR2 in About This Mac. In the "memory.txt" file created by the workflow, IS there an entry for "Type: DDR2"? Or is it called something other than 'Type' beside the DDR2?

 

Temporarily, you can open the text file "mymac.txt" and on line one put 'MacBook (13-inch, Late 2007)' - no single quotes, and on line 2 put the last 3 characters of your serial number (if the serial is actually 11 characters long), or last 4 characters of the serial number if it's 12 characters long. Doing that for now, should fix the top line.

 

After editing mymac.txt, the 'System' displays correctly, thanks.

In Europe we use comma as decimal mark, that's why the processor speed is displayed like that - perfectly fine. I never noticed the 'About this Mac' window uses another decimal mark... Anyway, it is stored with comma in hardware.txt, too.

 

No RAM type, good catch! My memory.txt looks like this:

 

Memory:

    Memory Slots:

      ECC: Disabled

        BANK 0/DIMM0:

          Size: 2 GB
          Type: DDR2 SDRAM
          Speed: 667 MHz
          Status: OK
          Manufacturer: 0x0000000000000000
          Part Number: 0x323034383733363735305320202020202020
          Serial Number: 0x00000000

        BANK 1/DIMM1:

          Size: 2 GB
          Type: DDR2 SDRAM
          Speed: 667 MHz
          Status: OK
          Manufacturer: 0x0000000000000000
          Part Number: 0x323034383733363735305320202020202020
          Serial Number: 0x00000000

 

 

Link to comment

After editing mymac.txt, the 'System' displays correctly, thanks.

In Europe we use comma as decimal mark, that's why the processor speed is displayed like that - perfectly fine. I never noticed the 'About this Mac' window uses another decimal mark... Anyway, it is stored with comma in hardware.txt, too.

 

No RAM type, good catch! My memory.txt looks like this:

<snipped>

 

OK, I've updated the download in the first post to 'correct' the RAM display. It will now show everything after "Type:" ... before, I only had it showing the last column. And the comma in CPU speed, YUP, sometimes I forget that different areas of the world show numbers and separators differently.

Link to comment

In the file "hardware.txt" create by the workflow, what is the identifier beside "Model Identifier:"? I checked the xml I created and it does in fact have 6 identifiers for MacMini, but perhaps I missed one.

 

OK, after a bit of research, I found that I did indeed MISS adding Macmini3,1 as an identifier in the xml. The download in the first post has been updated!

Link to comment

OK, I've updated the download in the first post to 'correct' the RAM display. It will now show everything after "Type:" ... before, I only had it showing the last column. And the comma in CPU speed, YUP, sometimes I forget that different areas of the world show numbers and separators differently.

 

Thanks, Rodger!

Everything is displayed correctly now.

Link to comment
  • 4 weeks later...

Great workflow RodgerWW, I'm having an issue I believe due to moving my profile from a older machine using time machine. The workflow shows the system information for the old machine, is there anyway to fix this?

 

Thanks

Link to comment

Great workflow RodgerWW, I'm having an issue I believe due to moving my profile from a older machine using time machine. The workflow shows the system information for the old machine, is there anyway to fix this?

 

Thanks

Type "xabout" and it should reset the workflow ... rewriting all the necessary files for the new machine.

Link to comment

Type "xabout" and it should reset the workflow ... rewriting all the necessary files for the new machine.

 

I tried this but still get the system info on the old machine, everything else seems to be correct. Thanks

Link to comment

I tried this but still get the system info on the old machine, everything else seems to be correct. Thanks

 

Hmm, that is ODD. The only thing I can think of, is delete the workflow, download it again from the first post and reinstall it. I can think of no reason why it should be linked to the old profile in any way.

Link to comment

Hmm, that is ODD. The only thing I can think of, is delete the workflow, download it again from the first post and reinstall it. I can think of no reason why it should be linked to the old profile in any way.

 

still no luck, very baffling

 

Y0r30aX.png

Edited by dntz
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...