<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks Stefan,</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I´ll take a look and try some new scripts</div>
<div id="signature">
<div id="divtagdefaultwrapper" dir="ltr">
<div><font face="Arial"><font style="background-color:rgb(255,255,255)"><span style="line-height:20px"></span></font></font></div>
<div style="color:rgb(0,0,0); font-family:Arial,Helvetica,sans-serif; font-size:12pt">
<font face="Arial"><font size="3"><font style="color:rgb(42,42,42); background-color:rgb(255,255,255)"></font><br>
</font></font></div>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>De:</b> Stefan Giese (WhereGroup) <stefan.giese@wheregroup.com><br>
<b>Enviado:</b> terça-feira, 12 de março de 2019 10:05<br>
<b>Para:</b> Herbert Lincon<br>
<b>Cc:</b> qgis-user@lists.osgeo.org<br>
<b>Assunto:</b> Re: [Qgis-user] Python Scripts (Boolean) in QGIS 3</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hi Herbert,<br>
with processing scripts ist has defintitly changed a lot. The thing is, <br>
that in QGIS 2.18 it was python but mixed with some none python, like <br>
the parameter with the double pound sign...like ##my_parameter=boolean<br>
<br>
so a good starting point is the blog from Anita Graser, since the <br>
documetation on qgis.org isn't that actual at the moment: <br>
<a href="https://anitagraser.com/2018/03/25/processing-script-template-for-qgis3/">https://anitagraser.com/2018/03/25/processing-script-template-for-qgis3/</a><br>
<br>
you can also start with the template directly in QGIS selecting "New <br>
script from template.." in the processing toolbox top, where the python <br>
icon is...<br>
<br>
Hope this helps a bit<br>
Stefan<br>
<br>
---<br>
Mit freundlichen Grüßen<br>
Stefan Giese<br>
<br>
Projektleiter/Consultant<br>
****************************************************************************<br>
FOSS Academy Kompaktkurs "Winterschule 2019"<br>
Grundwissen zum Aufbau von Geodateninfrastrukturen mit <br>
Open-Source-Software<br>
<a href="https://foss-academy.com/kompaktkurse">https://foss-academy.com/kompaktkurse</a><br>
****************************************************************************<br>
WhereGroup GmbH & Co. KG<br>
Schwimmbadstr. 2<br>
79100 Freiburg<br>
Germany<br>
<br>
Fon: +49 (0)761 / 519 102 - 61<br>
Fax: +49 (0)761 / 519 102 - 11<br>
<br>
stefan.giese@wheregroup.com<br>
<a href="http://www.wheregroup.com">www.wheregroup.com</a><br>
Amtsgericht Bonn, HRA 6788<br>
-------------------------------<br>
Komplementärin:<br>
WhereGroup Verwaltungs GmbH<br>
vertreten durch:<br>
Olaf Knopp, Peter Stamm<br>
-------------------------------<br>
<br>
Am 2019-03-12 13:48, schrieb Herbert Lincon:<br>
> Hello everyone,<br>
> <br>
>  I have a script in QGIS 2.18 to receive the information from 4<br>
> boolean options as simple as that<br>
> <br>
>  ##formula_1=boolean<br>
> <br>
> ##formula_2=boolean<br>
> <br>
> ##formula_3=boolean<br>
> <br>
> ##formula_4=boolean<br>
> <br>
> ##result=output string<br>
> <br>
> if formula_1 == True:<br>
> <br>
>     result= 1<br>
> <br>
> elif formula_2 == True:<br>
> <br>
>     result= 2<br>
> <br>
> elif formula_3 == True:<br>
> <br>
>     result= 3<br>
> <br>
> elif formula_4 == True:<br>
> <br>
>     result= 4<br>
> <br>
> else:<br>
>      result= 5<br>
> <br>
>  the problem is, this type of script doesn´t work in QGIS 3, and I´m<br>
> a newbie in Python,<br>
>  could someone translate that to the new method?<br>
> <br>
>  it´ll help me even begin to understand python 3<br>
> <br>
>  Thanks<br>
>  Herbert Lincon<br>
> _______________________________________________<br>
> Qgis-user mailing list<br>
> Qgis-user@lists.osgeo.org<br>
> List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
> Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</div>
</span></font></div>
</body>
</html>