sketchucation logo sketchucation
    • Login
    1. Home
    2. Anton_S
    3. Topics
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download
    A
    Offline
    • Profile
    • Following 0
    • Followers 7
    • Topics 52
    • Posts 1,261
    • Groups 2

    Topics

    • A

      Ruby rbconfig.rb

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      443 Views
      Dan RathbunD
      Should be the same, BUT the values of the Config::CONFIG hash attributes WILL DIFFER. The problem with the above statement is that rbconfig.rb is written by mkconfig.rb, (when the Ruby was built,) which may have itself changed over the various versions. Also, on Windows, some users install a one-click installer edition, that was not built on their own computer, and they may install it in a custom path, which may invalidate some of the values in the rbconfig.rb file. AND, only machines with a full Ruby install will have the rbconfig.rb file (in the platform subdir, of the Ruby lib dir.)
    • A

      Screen Coords

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      9
      0 Votes
      9 Posts
      341 Views
      A
      Okay, Thanks
    • A

      Need help with structures in callbacks

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      8
      0 Votes
      8 Posts
      5k Views
      A
      @thomthom said: @dan rathbun said: And it's Windows only. We really need a solution that works on both platforms (Mac and Windows,) and that means it needs to be built into the Sketchup API by Google. That depends if he is aiming to support both platforms... Well, yes, I do want to support those for both platforms, but its just a starting test for platform that I'm using. And its not I'm the only one who want's that, I know there is much more people that would also want that ability in their plugins. So, yes after a solution to this topic, the code will be extended into more abilities of using on other platforms. @dan rathbun said: Including a library file (Win32,) in the global ObjectSpace is a big no no. Your code needs to be wrapped within a module. BIG Thanks Dan This thing was bugging me all the time I've need to wtite a code. This was a thing I needed to be sure of. @dan rathbun said: If you look at some of the pure Ruby source in Dan Berger's windows-pr package, you'll come across examples of accessing C structures from Ruby using Array.pack and String.unpack Thanks , think this is a solution. I no doubt, WILL examine the pakage!!!
    • A

      Hook Procedure (win32 api)

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      6
      0 Votes
      6 Posts
      3k Views
      A
      , thanks Dan... Have you tried downloading the "HookProc.zip", which is on my first post of this topic? If you're willing to, can you please download it to plugins and test it if it works or not? Here is the reference: Items KeyboardProc - The stated script should write an active keyboard message to logLine or text and remove the message from being sent to current thread. Ex: Lets assume virtual keyboard message "p" is shortcut to pushpull. If you click key "p" while the KeyboardProc is not active, the shortcut should call the pushpull tool. If you click key "p" while the KeyboardProc is active then the pudspull tool won't be called. Keyboard messages will not be removed from other windows. It will just remove them from the stated window, which in this case would be the sketchup window. MouseProc - Should moniter/display mouse messages sent to the thread. Default script will not remove the messages. Ex: message 512 - mouse move, 522, mouse wheel rotate, 513 / 514 - mouse button clicks. LowLevelKeyboardProc - Should moniter/display and remove keyboard messages from the module handle. Ex: Lets say I have two windows: Sketchup and notepad++. In Sketchup window I activate LowLevelMouseProc, move to notepad++, and begin to type. Trying to type I don't get anything. It's because LowLevelKeyboard Hook Procedure prevents most the keyboard messages from to be sent to the module handle. Well, the once that it can't remove are some keyboard combination shortcuts, like "ctrl-alt-delete", "alt-lshift-PtrScn" and more. LowLevelMouseProc - Same as lowLevelKeyboardProc, but this time should display mouse messages sent to the module handle. Well you can state it to remove messages by changing "0" return value to "3", but by doing that your comp will act like the mouse is disconnected from the computer. If you'd want to remove only some mouse messages from module handle, then just write a block like "If wParam==512 then 0 else 3 end". All of the hooks above can be toggle by being set or unhooked. RemoveAll - Unhooks all hooks above. ClearTextQueue - Not really important in that role. Just clears the text queue that is displayed. LogLine remove's lines from text queue automatically, though just added for fun. Think this is all Thanks...
    • A

      Understanding Variables

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      169 Views
      A
      Okay, now I know!! And yeah at first my question made sense to me, but now it doesn't! Thanks
    • A

      Sketchup Source Files

      Watching Ignoring Scheduled Pinned Locked Moved SketchUp Discussions sketchup
      6
      0 Votes
      6 Posts
      481 Views
      thomthomT
      I poked about last week and I was investigating some edge loop routines.
    • A

      Win32 Utils

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      11
      0 Votes
      11 Posts
      449 Views
      thomthomT
      Sure, anyone can use the lib if they want. I've tried to document as much as possible.
    • A

      SU9 Ruby Version

      Watching Ignoring Scheduled Pinned Locked Moved SketchUp Feature Requests sketchup
      3
      0 Votes
      3 Posts
      868 Views
      A
      Hmmm... Ok, jst wanted it since the DL includes callback function and the ruby itself is cleaner and better, but I know there's a diff way - I could jst use the Win32::API utility to get/set callbacks.
    • A

      Changing Command Icons of the Toolbar

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      19
      0 Votes
      19 Posts
      3k Views
      M
      Thanks Anton, I was thinking, that I'm doing something wrong, but it seems that this behaviour is not changed yet.
    • A

      Getting cursor position while SP simulation is running.

      Watching Ignoring Scheduled Pinned Locked Moved SketchyPhysics
      7
      0 Votes
      7 Posts
      1k Views
      A
      To get all module methods: MSketchyPhysics3.methods MSketchyPhysics3.private_methods MSketchyPhysics3.instance_methods MSketchyPhysics3.private_instance_methods You can examine the sketchy physics files to see those methods and here is the source to module: http://www.ruby-doc.org/core-1.9.3/Module.html
    • A

      Cursor Position To November92

      Watching Ignoring Scheduled Pinned Locked Moved SketchyPhysics
      5
      0 Votes
      5 Posts
      994 Views
      A
      NewtonServer is a dll library to newton physics stuff
    • A

      Changing Toolbar Image

      Watching Ignoring Scheduled Pinned Locked Moved SketchUp Feature Requests sketchup
      3
      0 Votes
      3 Posts
      866 Views
      Dan RathbunD
      @tig said: So theoretically you could [re]set the @@playcmd.small_icon() etc dynamically in response to a user clicking the button and/or the tool's @state changing etc... There's no problem with changing the path to the image (no exception is raised,) it's just that the UI::Toolbar instance ignores the change. We've tried closing and opening the toolbar, but no effect. This is a change that needs to be implemented in the API using the relevant system calls on each platform. (I know how to do it on Windows making a Win32 call, but not on Mac.) So, this is a true wish... add my vote.
    • 1 / 1