PDA

View Full Version : HELP: windows.sendMessage and "Edit" object


magost
09-29-2011, 10:06 AM
Hi!

I have done a script in order to export some objects to obj and i'm having some problems.
I want to change the values of some options into the obj export window. I can change the value of the checkBoxes and the values of the dropDownList.
The thing is that i'm not able to change the value of the scale spinner. The spinner is an "Edit" object and after looking for some info I found the signals to change the values of an "Edit" object but i have no results :sad:
I'm changing the values with this code:

windows.sendMessage flipControl_hwnd WM_SETTEXT 0 newValue
windows.sendMessage flipControl_parent_hwnd WM_COMMAND ((bit.shift EM_SETMODIFY 16) + flipControl_id) flipControl_hwnd

Any idea why it's not working?

Any help will be welcomed

stigatle
09-29-2011, 10:26 AM
which spinner is it that you try to modify?

you can access them this way too:
(search for 'ObjExp : ExporterPlugin' in 3dsmax manual)

--Open the INI file for editing in the MAXScript Editor
edit (objexp.getIniName())

--Alternatively, use INI file access to read and write:
theINI =objimp.getIniName()
getIniSettingtheINI--get INI file categories
-->#("General", "Geometry", "Material", "Output", "Optimize")

--get the keys of the General category:
getIniSetting theINI"General"
-->#("UseLogging", "Preset", "MapSearchPath")

--get the value of the General >Use Logging key:
getIniSetting theINI"General" "UseLogging"
-->"1"

--Turn Loggingoff:
setIniSetting theINI"General" "UseLogging" "0"
-->true

magost
09-29-2011, 10:39 AM
Thanks for the answer stigatle.

That was not the approach i was looking for but it could be helpful since i'm using Max 2010 :buttrock:
But what about the older versions :cry:

By the way, the spinner i'm trying to modify is the Scale spinner.

stigatle
09-29-2011, 10:40 AM
when you run it you see all the parameters you can modify,
the scale is there, just replace it in the sample code and you should be good to go :)

denisT
09-29-2011, 01:30 PM
That was not the approach i was looking for but it could be helpful since i'm using Max 2010 :buttrock:
But what about the older versions :cry:

By the way, the spinner i'm trying to modify is the Scale spinner.
http://forums.cgsociety.org/showpost.php?p=6969565&postcount=9

magost
09-30-2011, 12:44 PM
Hi denisT!

I'll try that, this is what i was looking for.
Right now i'm not sure if continue with my idea or try the stigatle approach.

:applause:

CGTalk Moderation
09-30-2011, 12:44 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.