Topic: Syntax error in Section [Download_Files]  (Read 276 times)

0 Members and 1 Guest are viewing this topic.

Syntax error in Section [Download_Files]
« on: April 21, 2017, 09:19:54 AM »

ied206

  • Chef
  • ***
  • Location: South Korea
  • Date Registered: Dec 2013
  • Posts: 115
There is syntax error in Section [Download_Files].

Code: [Select]
// This section also used directly by ML
// 1 Folder 2 FileName 3 Web (Cancelled 4 NoExit )
If,#3-,Equal,-,Echo,"Download File - Parameter Missing%,Warn
Else,Run,%Api%,Download_Files_P,#1,#2,#3,#4,#5,#6,#7,#8,#9

One of the doublequote is missing in Echo,"Download File - Parameter Missing%,Warn.
I found this error while testing Macro Library with PEBakery, WinBuilder seems to ignore this.


Re: Syntax error in Section [Download_Files]
« Reply #1 on: April 21, 2017, 11:43:01 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7012
Thanks ied206,

Macro Library updated to v43r76 with your fix.  :thumbsup:


ps:

keep in mind, there is rare double if inside plugins
If,....,If,.....
There is NO 3 or more if inside plugins
If,....,If,.....,If,.....
edit:
In history due to winbuilder bug reasons,  we intentionally avoid 3 or more If - Later in time we clean most of double if.

For your builder, We can convert all "double If" to "single If" ?  :great:
just let us know.    :thumbsup:

:turtle:
« Last Edit: April 22, 2017, 12:04:37 AM by Lancelot »

Re: Syntax error in Section [Download_Files]
« Reply #2 on: April 22, 2017, 12:39:13 AM »

ied206

  • Chef
  • ***
  • Location: South Korea
  • Date Registered: Dec 2013
  • Posts: 115
I hadn't tried to write kind of 'converting' operations.

But since PEBakery generates kind of parse tree internally, I think cleaning nested If/Else would be able later.

Edit:
I guess I misunderstood your question.

PEBakery currently supports nested If/Else, so there is no need to convert into single If.

However, if we can, converting nested If into single If will helps us in point of readability.
(It will also help converting WB syntax into new syntax)
« Last Edit: April 22, 2017, 01:53:36 AM by ied206 »

Re: Syntax error in Section [Download_Files]
« Reply #3 on: April 23, 2017, 12:56:08 AM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7012
If,#3-,Equal,-,Echo,"Download File - Parameter Missing%,Warn
Else,Run,%Api%,Download_Files_P,#1,#2,#3,#4,#5,#6,#7,#8,#9
[/codebox]

One of the doublequote is missing in Echo,"Download File - Parameter Missing%,Warn.
I found this error while testing Macro Library with PEBakery, WinBuilder seems to ignore this.

I guess I misunderstood your question.

Thinking you work on IF syntax on PEBBakery,

I only remind IF syntax used double inside plugins since supported by wb.

And gave more info about that.

ex:
Win10PESE\Main Configuration
Code: [Select]
If,%WIMDriver%,Equal,Wimfltr,If,ExistFile,%Tools%\%OSArch%\wimgapi6.0.dll,Begin

:turtle:

 

Powered by EzPortal