Jump to content

C_bonaker_1976

Member
  • Posts

    2
  • Joined

  • Last visited

Everything posted by C_bonaker_1976

  1. Thank-you very much for the help. It turns out that I found a much simplier way to do what I was trying to do. I used this amazing function dialogint. I then converted the number to a string and updated the field. I would never have looked at that command had you not posted your help. That dialog somehow has the ability to take input and then exit with a return. *shrug* My question now is how do I take my script that works great when I double click it on my custom palette, but won't work when I try to create a tool or menu command. What is the difference between a script created on the resource palette, and one cut and pasted (same one) into a tool or menu command on the plug-in editor. I have Vectorworks 9.02 until the funding comes through. Any ideas. Thanks again for the help.
  2. If you select a field in a dialog so that you can type over the current information, how do you make it so that when you hit the enter key, it automatically acts as if the ok button has been selected. I'm trying my hand at writing a tool that will allow me to update a record field attached to an object just by selecting the object and running the script. That part works. I've fed the field with the old information as a reference, then selected the field so that all you have to do is type the new value. But you have to click ok, which is much slower than just hitting return. It would be great if you typed the new number, then could hit enter to send the info. Here is the code I've started from for the dialog: PROCEDURE Dialogstart; VAR item: Integer; cancel, done : Boolean; BEGIN BeginDialog(1,1,100,100,300,300); AddButton('OK',1,1,110,175,180,190); AddButton('Cancel',2,1,20,175,90,190); AddField('test',3,1,15,20,180,40); AddField('test',4,2,15,60,180,80); EndDialog; GetDialog(1); SetTitle('Test'); cancel := False; done := False; SelField (4); REPEAT DialogEvent(item); IF item = 2 THEN cancel := True; IF item = 1 THEN done := True; UNTIL cancel | done; END; RUN(Dialogstart); Any Ideas? Thanks for any help.
×
×
  • Create New...