Re: [Gambas-user] Shell command

2017-08-08 Thread Jussi Lahtinen
Isn't that exactly what I suggested..? However there shouldn't be crash anyway, only error raised. Jussi On Tue, Aug 8, 2017 at 4:43 AM, Shane wrote: > of cause missed that looking in wrong place > > Thanks Tony > > > > On 08/08/17 00:17, Tony Morehen wrote: > >> Shane, >> >> I can reproduce y

Re: [Gambas-user] Shell command formating

2017-08-07 Thread Shane
thanks tony this works just needs the & in front of the 1 On 08/08/17 00:30, Tony Morehen wrote: Try changing command to: command = "stm8flash -c stlinkv2 -p " & stmdevice & " -w " & path & " 2>1" On 2017-08-06 09:52 PM, Shane wrote: command = "stm8flash -c stlinkv2 -p " & stmdevice & " -

Re: [Gambas-user] Shell command formating

2017-08-07 Thread Shane
That worked great T Lee thanks On 08/08/17 00:00, T Lee Davidson wrote: On 08/06/2017 09:52 PM, Shane wrote: So again on the shell command I have this code Dim result As String Dim command As String path = File.SetExt(file_name, "ihx") command = "stm8flash -c stlinkv2 -p " & stmdevice &

Re: [Gambas-user] Shell command

2017-08-07 Thread Shane
of cause missed that looking in wrong place Thanks Tony On 08/08/17 00:17, Tony Morehen wrote: Shane, I can reproduce your crash here on 3.9.2. It's cause is the line: Settings["Options/stmDevice"] = ComboBox1.Current If that line is changed to: Settings["Options/stmDevice"] = ComboBox1.C

Re: [Gambas-user] Shell command formating

2017-08-07 Thread Tony Morehen
Try changing command to: command = "stm8flash -c stlinkv2 -p " & stmdevice & " -w " & path & " 2>1" On 2017-08-06 09:52 PM, Shane wrote: command = "stm8flash -c stlinkv2 -p " & stmdevice & " -w " & path -- Check ou

Re: [Gambas-user] Shell command

2017-08-07 Thread Tony Morehen
Shane, I can reproduce your crash here on 3.9.2. It's cause is the line: Settings["Options/stmDevice"] = ComboBox1.Current If that line is changed to: Settings["Options/stmDevice"] = ComboBox1.Current.Text or the simpler, and in my mind preferred: Settings["Options/stmDevice"] = ComboBox1.T

Re: [Gambas-user] Shell command formating

2017-08-07 Thread T Lee Davidson
On 08/06/2017 09:52 PM, Shane wrote: So again on the shell command I have this code Dim result As String Dim command As String path = File.SetExt(file_name, "ihx") command = "stm8flash -c stlinkv2 -p " & stmdevice & " -w " & path Shell command To result FMain.TextArea1.Text = result but t

[Gambas-user] Shell command formating

2017-08-06 Thread Shane
So again on the shell command I have this code Dim result As String Dim command As String path = File.SetExt(file_name, "ihx") command = "stm8flash -c stlinkv2 -p " & stmdevice & " -w " & path Shell command To result FMain.TextArea1.Text = result but the output is going to stdout and not th

Re: [Gambas-user] Shell command

2017-08-06 Thread Shane
here is all the code Public sdevices As String Public Sub SaveOps_Click() Settings["Options/CCompCLine"] = TextBox1.Text Settings["Options/stmDevice"] = ComboBox1.Current 'Settings.Save() Me.Close End Public Sub Form_Open() Dim devices As String[] Dim d As String ' 'TextBox1.Text

Re: [Gambas-user] Shell command

2017-08-06 Thread Shane
Same thing here is a file with the output On 07/08/17 11:10, Tony Morehen wrote: what is the output of the shell line? If you could post the complete output, we could properly test your code. You could try this line: devices = Split(sdevices, " ", "", True) On 2017-08-06 08:35 PM, Shane w

Re: [Gambas-user] Shell command

2017-08-06 Thread Jussi Lahtinen
Is that all the code in the form? Can you give your system information? Jussi On Mon, Aug 7, 2017 at 3:35 AM, Shane wrote: > Hi Jussi > > I gave that a try by commenting that line out still the same result so > that not the problem > > > > > On 06/08/17 22:17, Jussi Lahtinen wrote: > >> I gues

Re: [Gambas-user] Shell command

2017-08-06 Thread Tony Morehen
what is the output of the shell line? If you could post the complete output, we could properly test your code. You could try this line: devices = Split(sdevices, " ", "", True) On 2017-08-06 08:35 PM, Shane wrote: Hi Jussi I gave that a try by commenting that line out still the same result

Re: [Gambas-user] Shell command

2017-08-06 Thread Shane
Hi Jussi I gave that a try by commenting that line out still the same result so that not the problem On 06/08/17 22:17, Jussi Lahtinen wrote: I guess settings component can't handle saving of arbitrary object. In this case "Settings["Options/stmDevice"] = ComboBox1.Current". Maybe you want

Re: [Gambas-user] Shell command

2017-08-06 Thread Jussi Lahtinen
I guess settings component can't handle saving of arbitrary object. In this case "Settings["Options/stmDevice"] = ComboBox1.Current". Maybe you want to save ComboBox1.Current.Text? However there shouldn't be segfault. Jussi On Sun, Aug 6, 2017 at 7:18 AM, Shane wrote: > I have this in a sub fo

[Gambas-user] Shell command

2017-08-05 Thread Shane
I have this in a sub form Public sdevices As String Public Sub SaveOps_Click() Settings["Options/CCompCLine"] = TextBox1.Text Settings["Options/stmDevice"] = ComboBox1.Current 'Settings.Save() Me.Close End Public Sub Form_Open() Dim devices As String[] Dim d As String ' TextBox1.

Re: [Gambas-user] Shell command not working

2013-03-07 Thread Jesus
El 07/03/13 13:40, Jose Monteiro escribió: > text = "cd ~/.relat_bact && rm -rf Modelo*.odt && zip -r " & "MA" & > Mid$(ListBox1.Text, 1, 9) & ".odt ." >Shell text Wait > > 1 - navigating to ~/.relat_bact directory and deleting the odt file is > working fine. > > 2 - generating the "zipped"

[Gambas-user] Shell command not working

2013-03-07 Thread Jose Monteiro
text = "cd ~/.relat_bact && rm -rf Modelo*.odt && zip -r " & "MA" & Mid$(ListBox1.Text, 1, 9) & ".odt  ."   Shell text Wait 1 - navigating to ~/.relat_bact directory and deleting the odt file is working fine. 2 - generating the "zipped" odt file (MA.odt) using the files and directories ins

Re: [Gambas-user] Shell command including string containing a quote

2013-01-29 Thread Tobias Boege
On Tue, 29 Jan 2013, John Rose wrote: > Tobias, > > Thanks for that useful reply. > > I have a quick question (it doesn't seem worth asking on the Mailing List): > Using Dialog.OpenFile(), the resulting Dialog.Path shows the full path > to the file (e.g. /home/john/x.txt). Given that the runtime

Re: [Gambas-user] Shell command including string containing a quote

2013-01-29 Thread John Rose
Tobias, Thanks for that useful reply. I have a quick question (it doesn't seem worth asking on the Mailing List): Using Dialog.OpenFile(), the resulting Dialog.Path shows the full path to the file (e.g. /home/john/x.txt). Given that the runtime user might change to a different directory (from t

Re: [Gambas-user] Shell command including string containing a quote

2013-01-24 Thread Rob Kudla
On 01/24/2013 12:59 PM, John Rose wrote: > I have written a GUI to execute a command which involves selecting > filenames (e.g. sCombinedPath below) to be used in a Shell command (as part > of a Process). It works OK generally. However, if any filename includes a > quote, it goes wrong. > sCommand

Re: [Gambas-user] Shell command including string containing a quote

2013-01-24 Thread John Rose
Thanks Tobias. It worked. Regards, John On 24/01/13 21:08, Tobias Boege wrote: > On Thu, 24 Jan 2013, John Rose wrote: >> I have written a GUI to execute a command which involves selecting >> filenames (e.g. sCombinedPath below) to be used in a Shell command >> (as part of a Process). It works OK

Re: [Gambas-user] Shell command including string containing a quote

2013-01-24 Thread Tobias Boege
On Thu, 24 Jan 2013, John Rose wrote: > I have written a GUI to execute a command which involves selecting > filenames (e.g. sCombinedPath below) to be used in a Shell command > (as part of a Process). It works OK generally. However, if any > filename includes a quote, it goes wrong. > > sCommand

Re: [Gambas-user] Shell command including string containing a quote

2013-01-24 Thread M. Cs.
I guess you will need Chr$(39) as ASCII code for ', or if you need double quote just use Chr$(34). 2013/1/24 John Rose > I have written a GUI to execute a command which involves selecting > filenames (e.g. sCombinedPath below) to be used in a Shell command (as part > of a Process). It works OK

[Gambas-user] Shell command including string containing a quote

2013-01-24 Thread John Rose
I have written a GUI to execute a command which involves selecting filenames (e.g. sCombinedPath below) to be used in a Shell command (as part of a Process). It works OK generally. However, if any filename includes a quote, it goes wrong. sCommand = "mplex -f 8 -o " & "'" & sCombinedPath & "'

Re: [Gambas-user] SHELL command with python does not execute!

2010-02-12 Thread Benoît Minisini
> Benoît Minisini ha scritto: > > Query to Benoit ... is there a way to define 'NOT NULL' entry via > > gambas code ? > > You have to define the default value. What's the point of having a > mandatory field (NOT NULL) without a default value? > >>> > >>> just say i want somet

Re: [Gambas-user] SHELL command with python does not execute!

2010-02-12 Thread Doriano Blengino
Benoît Minisini ha scritto: >> > > Query to Benoit ... is there a way to define 'NOT NULL' entry via > gambas code ? > You have to define the default value. What's the point of having a mandatory field (NOT NULL) without a default value? >>> just s

Re: [Gambas-user] SHELL command with python does not execute!

2010-02-11 Thread Fabien Bodard
2010/2/11 Vassilis K : > I 'll use the Gambas Mysql commands to make a table ! it works ! > The reason that I asked you is that the code for creating a Mysql table > in Gambas is less accurate than the code of python. no at same... but the gambas code way allow you to change the database server wit

Re: [Gambas-user] SHELL command with python does not execute!

2010-02-11 Thread Benoît Minisini
> Fabien Bodard ha scritto: > > Le 11 février 2010 15:23, Benoît Minisini > > > > a écrit : > >>> sql = "CREATE TABLE Aplianikis (" > >>> "aa BIGINT(20) NOT NULL auto_increment," > >>> "Eponimia VARCHAR(40) NOT NULL," > >>> "AFM VARCHAR(18) NOT NULL," > >>> "Hmerom

Re: [Gambas-user] SHELL command with python does not execute!

2010-02-11 Thread Vassilis K
I 'll use the Gambas Mysql commands to make a table ! it works ! The reason that I asked you is that the code for creating a Mysql table in Gambas is less accurate than the code of python. -- SOLARIS 10 is the OS for Data

Re: [Gambas-user] SHELL command with python does not execute!

2010-02-11 Thread Doriano Blengino
Fabien Bodard ha scritto: > Le 11 février 2010 15:23, Benoît Minisini > a écrit : > >>> sql = "CREATE TABLE Aplianikis (" >>> "aa BIGINT(20) NOT NULL auto_increment," >>> "Eponimia VARCHAR(40) NOT NULL," >>> "AFM VARCHAR(18) NOT NULL," >>> "Hmerominia DATE NOT N

Re: [Gambas-user] SHELL command with python does not execute!

2010-02-11 Thread Fabien Bodard
Le 11 février 2010 15:23, Benoît Minisini a écrit : >> sql = "CREATE TABLE Aplianikis (" >>         "aa BIGINT(20) NOT NULL auto_increment," >>         "Eponimia VARCHAR(40) NOT NULL," >>         "AFM  VARCHAR(18) NOT NULL," >>         "Hmerominia DATE NOT NULL," >>         "Checkbox TINYINT(1) NO

Re: [Gambas-user] SHELL command with python does not execute!

2010-02-11 Thread Benoît Minisini
> sql = "CREATE TABLE Aplianikis (" > "aa BIGINT(20) NOT NULL auto_increment," > "Eponimia VARCHAR(40) NOT NULL," > "AFM VARCHAR(18) NOT NULL," > "Hmerominia DATE NOT NULL," > "Checkbox TINYINT(1) NOT NULL," > "primary key(aa)" > ")" >

Re: [Gambas-user] SHELL command with python does not execute!

2010-02-11 Thread Fabien Bodard
sql = "CREATE TABLE Aplianikis (" "aa BIGINT(20) NOT NULL auto_increment," "Eponimia VARCHAR(40) NOT NULL," "AFM VARCHAR(18) NOT NULL," "Hmerominia DATE NOT NULL," "Checkbox TINYINT(1) NOT NULL," "primary key(aa)" ")" "DEFAULT CHARSET

Re: [Gambas-user] SHELL command with python does not execute!

2010-02-11 Thread Vassilis K
I am using python because it executes the table creation commands with the same type like in terminal mode. For example in python we write: sql = """CREATE TABLE Aplianikis ( aa BIGINT(20) NOT NULL auto_increment, Eponimia VARCHAR(40) NOT NULL, AFM VARCHAR(18) NOT NULL,

Re: [Gambas-user] SHELL command with python does not execute!

2010-02-11 Thread Doriano Blengino
Fabien Bodard ha scritto: > >>> >>> I am using the following code for the creation of a table in a Mysql DB: >>> >>> >>> SHELL"python >>> /home/delphi/Documents/Apodeixi/dimiourgiaTableMYSQLmePython1.py" IF ERROR >>> THEN >>> Message.Error(DConv(Error.Text)) >>> ENDIF >>> >>> The co

Re: [Gambas-user] SHELL command with python does not execute!

2010-02-11 Thread Fabien Bodard
and why are you using python to create your table ??? Le 11 février 2010 12:35, Benoît Minisini a écrit : >> Hello again, >> >> I am using the following code for the creation of a table in a Mysql DB: >> >> >> SHELL"python >>  /home/delphi/Documents/Apodeixi/dimiourgiaTableMYSQLmePython1.py" IF E

Re: [Gambas-user] SHELL command with python does not execute!

2010-02-11 Thread Benoît Minisini
> Hello again, > > I am using the following code for the creation of a table in a Mysql DB: > > > SHELL"python > /home/delphi/Documents/Apodeixi/dimiourgiaTableMYSQLmePython1.py" IF ERROR > THEN > Message.Error(DConv(Error.Text)) > ENDIF > > The command works perfectly and it cr

[Gambas-user] SHELL command with python does not execute!

2010-02-11 Thread Vassilis K
Hello again, I am using the following code for the creation of a table in a Mysql DB: SHELL"python /home/delphi/Documents/Apodeixi/dimiourgiaTableMYSQLmePython1.py" IF ERROR THEN Message.Error(DConv(Error.Text)) ENDIF The command works perfectly and it creates the table.