Yet another SU Ruby question

UKworkshop.co.uk

Help Support UKworkshop.co.uk:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

Steve Maskery

Established Member
Joined
26 Apr 2004
Messages
11,795
Reaction score
156
Location
Kirkby-in-Ashfield
OK, so I'm sorting out the useful Ruby scripts from the rest, to try to reduce the size of my Context menu and Plugins list.

I have found that some of the entries in the lists do not seem to be in any of the scripts in the Plugins directory, nor even in the whole of the @Last directory. Clearly this cannot be the case, as they weren't there before I added all these scripts; nevertheless, a seach of my directory for "Copy along path", for example, finds nothing. There are others, too.

I have found that some of the rb scripts are readable ascii files, whilst others appear to have been compiled. They still seem to be ascii - I can edit them in Wordpad - but they are not readable in the normal sense. I suspect this is where these entries are.

Does anyone know how to read these so I can edit out the unwanted stuff?

TVM
Steve

PS As an aside, does anyone know why it takes Microsoft half an hour to seach my little PC whilst Google can seach the entire planet in a millisecond?
 
No answer to your last question, I'm afraid.

So you are saying that when you look in the Plugins folder, the script is missing? Or is it that they don't show in the Plugins menu in SU? If it is the former, I think you'll need to reformat your HD. Sorry, couldn't resist. :D

If it is the latter, open the script in question in Notepad or Wordpad. Scroll to the bottom and read the last few lines. That will tell you where the script will show up in SU. Keep in mind some scripts are context sensitive and only show up in the context menu when you have something selected on which the script can act. Windowizer is one that is like that.

Some scripts will show up in other menus so you need to look in them, too. I have edited some of the scripts that appeared in the Plugins menu so that they are in the Tools or Draw menus because that makes more sense to me and it shortens the Plugins menu.

The scripts you can't read are probably .RBS instead of .RB. They are scrambled by the writer so others can't edit them. GSU evidently doesn't support scrambled Rubies but SU5Pro does.

Hope that helps.
 
Here's an example of the part of the script that tells you where the script will be accessed. I copied if from your Fillet post. the part in bold text is the part you want to see. You could change Plugins to Tools for example and FilletTool would appear in the Tools menu. You can simply edit the text and save the file to make this happen.

end # of class FilletTool
#----------------------------------------------------------------------------
def frametool
Sketchup.active_model.select_tool FilletTool.new
end

if( not file_loaded?("FilletTool.rb") )
UI.menu("Plugins").add_item("FilletTool") { Sketchup.active_model.select_tool FilletTool.new }
end
#-----------------------------------------------------------------------------
file_loaded("FilletTool.rb") # load"FilletTool.rb"
 
Steve Maskery":1430ehyf said:
PS As an aside, does anyone know why it takes Microsoft half an hour to seach my little PC whilst Google can seach the entire planet in a millisecond?
It's 'cos the entire planet reformats regularly...
 
Dave,
Yes, that's my understanding, too.

But I have, in the plugins menu, "Copy long path". It doesn't seem to do anything I shall ever need, so I'd like to get rid of it. None of the scripts in the Plugins directory contain the string "Copy along path", so I can't find out which particular script to remove.

Is that any clearer?

Cheers
Steve
 
Got it!

Look for pathcopy.rb and delete that. Actually, before you delete it, open it and scroll to the bottom. You'll see the menu entry.

If you are getting rid of it, also get rid of vector.flat_angle.rb and pathcopy cursor.png. They are associated with pathcopy.rb

If you don't want to delete these because you might want them later, change pathcopy.rb to pathcopy.rb.txt and it won't appear in the menu.
 
Thanks Dave. Great.
I'm still puzzled though - I don't seem to have vector.flat_angle.rb and pathcopy cursor.png at all (at least, I can't find them) and I still don't understand why my Windows search didn't find the string "Copy along path" when I asked it to look inside the files.
Please don't tell me to buy a Mac. Apart from anything else, I haven't got time to go shopping for new computers, I'm too busy reformatting.

If you can't beat 'em...
Hey ho.

Cheers
Steve
 
Maybe those other files aren't there. I was looking on a Ruby library site and found a zip file that included all three of those files. I just assumed you picked up the script there. Or maybe you did but only extracted the pathcopy.rb script.

I don't know why Windows search wouldn't find that text string. Weird.
 
It won't find ANY text string!

I've just searched for "random" in all files in the plugins directory, and it returns no results!

Terrific. :cry:

Cheers

Steve
 
Steve Maskery":3i9ob76f said:
Dave,
Yes, that's my understanding, too.

But I have, in the plugins menu, "Copy long path". It doesn't seem to do anything I shall ever need, so I'd like to get rid of it. None of the scripts in the Plugins directory contain the string "Copy along path", so I can't find out which particular script to remove.

Is that any clearer?

Cheers
Steve

Steve you need something called Files Search Assistantbecause one thing about XP is it's really crappy search routines. FSA allows you to search inside files and grades them with a percentage as to how relevant it is. It will allow you to find the offending scripts dead easy. :wink:

It's not cheap but it is by far the best search program I've used.
 
Steve Maskery":4w2ttn1n said:
It won't find ANY text string!

I've just searched for "random" in all files in the plugins directory, and it returns no results!

Terrific. :cry:

Cheers

Steve

Steve its the XP search engine... It's total BLEEEEEEEEEP! :lol:
 
Steve
Have a look at Google Desktop- it will transform how you store and search files on your computer. Once it's done its indexing it is lightning fast. It will even do you e-mail - both Exchange and Express.
Cheers
Gidon
 
Steve - it automatically searches inside files. There are some options for quick find in your preferences to disable this but but default it does it.
Cheers
Gidon
 
gidon":li79c0ln said:
There are some options for quick find in your preferences to disable this but by default it does it.

In that case, Gidon, it's no better than Windows :(

FSA, on the other hand, found everything I've asked of it. Great for a trial, but too much dosh for the rare occurrence when I'll really nead it. Still, I've got 30 days.

Cheers
Steve
 
Steve - sorry I don't understand - GDS does search any strings in any files - and a lot quicker than XP. You can put the string in double quotes if you want to narrow your search. Maybe I've misunderstood what you're trying to do?
Cheers
Gidon
 
Gidon,

I mean that many of the rb files contain, for example, the word "Ruby". If I ask GD or XP search engines to seach for "Ruby", the rb files are not in the search results. File names with the string "Ruby" are found, but not files which are not called "Ruby" but have the string "Ruby" inside them.

In XP I have the "Look inside files" switch turned on. I can't see an equivalent in GD.

It does seem very strange to me. Is it becasue they are .rb files rather than .txt files? Doesn't seem very likely.

As I say, the same search using FSA worked fine.

Cheers
Steve
 
Back
Top