Topic: Possible "bug" in "images.script"  (Read 14066 times)

Re: Possible "bug" in "images.script"
« Reply #20 on: May 18, 2011, 08:16:10 PM »

sbaeder

  • *banned*
  • Jr. Chef
  • **
  • Date Registered: Apr 2011
  • Posts: 40
Here is a more complete testing script.  It has a local copy of the API code, and a button to run it, as well as a button to run the API version (to compare) and to reset the values in the interface.

I think that the changes made so far by Galapo work just fine for "normal" text labels - ones with or without spaces/quotes.  It's when you add in a comma or a quote INSIDE the string label that it gets weird, and that 80 has a lot of issues that seem "better" (or just different  :wink: ) depending on your point of view.

I agree with Chris that he can fix the symptom by either adding a space or removing the quotes from the images.script...BUT, probably better to fix (and document limitations) in the CAPI routine.
« Last Edit: May 18, 2011, 08:22:40 PM by sbaeder »

Re: Possible "bug" in "images.script"
« Reply #21 on: May 18, 2011, 09:56:19 PM »

Galapo

  • Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
sorry. no change in results. :(

It was working for me with the test script posted above. However, I guess you tested with this images.script which I assume has some additional peculiarities. I'll test sbaeder's code a bit later and see what I can do.

Regards,
Galapo.

Re: Possible "bug" in "images.script"
« Reply #22 on: May 19, 2011, 03:56:51 AM »

Galapo

  • Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
sbaeder's code has some bugs which made testing a bit difficult.

In the end I'm giving up on this. It really is a nightmare coding this task with WB syntax and its limitations. I think it's better to use an AutoIt script which CAPI calls to accomplish the task. Such manipulation is fine in AutoIt, and you may check the ScriptManager code which could be reused if so desired. http://theoven.org//index.php?topic=84.0

Regards,
Galapo.

Re: Possible "bug" in "images.script"
« Reply #23 on: May 19, 2011, 05:14:45 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
I think it's better to use an AutoIt script which CAPI calls to accomplish the task. Such manipulation is fine in AutoIt, and you may check the ScriptManager code which could be reused if so desired. http://theoven.org//index.php?topic=84.0
:lol: to me fine, and very much more solid once it is made properly, up to homes32  :thumbsup:

@homes32
Final decision is yours, remove ScriptInterface, or have ScriptInterface via au3 or wb. I rememember you had offered au3 on capi on other things :wink: much before, this one is very suitable for this task  :thumbsup:
Final decision is yours  :great:

Re: Possible "bug" in "images.script"
« Reply #24 on: May 21, 2011, 04:34:58 AM »

sbaeder

  • *banned*
  • Jr. Chef
  • **
  • Date Registered: Apr 2011
  • Posts: 40
sbaeder's code has some bugs which made testing a bit difficult.
Hmmm...can you elaborate more...Other than including a copy of the API routines and a button to invoke them (instead of CAPI) and a button to invoke CAPI, and a button to set them back to standard value so it can be tested, what was "wrong"...I never claimed that the code to implement the routines locally was fixed - I just used what was posted above.

Would like to know in order to "learn"...I spent some time trying to make sure that I re-wrote the values in a consistent manner so that you could re-test from a known state...

As for using external scripting/executables...Even then, I'm not sure you can properly cover all the cases that MIGHT come up.  Maybe an external program can make it's own choices about "escaped" quotes, commas, etc. as opposed to doing it in WB, which has its own rules for things like that...BUT, with an INI style read and write, and knowing more about the number of parameters, seems you should be able to do it OK...As I said, in my testing, the fix supplied above worked fine for me...

At the end of the day, it's up to all of you...

Re: Possible "bug" in "images.script"
« Reply #25 on: May 21, 2011, 04:41:30 AM »

Galapo

  • Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
Sorry, I have to be quick...

As for using external scripting/executables...Even then, I'm not sure you can properly cover all the cases that MIGHT come up. 

Sure it is possible. That's exactly what the ScriptManager program does with it's backup, restore, and verification routines. This would just need to be extended to cover the aditional options (like blevel etc) not covered by ScriptManger. Code of course can be reused or modified if need be since it is opensource.

Regards,
Galapo.

Re: Possible "bug" in "images.script"
« Reply #26 on: May 23, 2011, 11:27:38 AM »

Galapo

  • Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
sbaeder's code has some bugs which made testing a bit difficult.
Hmmm...can you elaborate more

Section [WIMInterfaceInfo_Replace] doesn't always reset the interface. I didn't narrow down under what conditions this was happening as I gave up on WB being able to do this interface stuff well natively.

Regards,
Galapo.

Re: Possible "bug" in "images.script"
« Reply #27 on: May 23, 2011, 01:45:29 PM »

Homes32

  • Code Baker
  • Chef
  • ***
  • Date Registered: Dec 2010
  • Posts: 177
agreed. writeinterface is a nightmare with WB syntax. autoit is a much better choice for this task. I'll look into it when I get a spare moment.

Re: Possible "bug" in "images.script"
« Reply #28 on: May 24, 2011, 04:30:59 PM »

sbaeder

  • *banned*
  • Jr. Chef
  • **
  • Date Registered: Apr 2011
  • Posts: 40
OK - yes, there are some cases (I think) where you can get the original so AFU that it can't be reset...If I get a moment I amy look at it, but I agree 100% that for now, the interface encoding is "difficult" to manage with native code...

Re: Possible "bug" in "images.script"
« Reply #29 on: May 25, 2011, 02:02:23 AM »

Galapo

  • Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
but I agree 100% that for now, the interface encoding is "difficult" to manage with native code...

Well, it's downright cumbersome. And nearly impossible, given that we all have been giving it attention and haven't been able to code a solution. Better to code the function in opensource AU3 where results are much more predicatable.

Regards,
Galapo.

 

Powered by EzPortal