Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Jean

Pages: 1 ... 11 12 [13] 14 15 ... 20
181
Planetdance for windows / Re: shortcuts
« on: September 21, 2020, 04:16:12 PM »
it's accessible from File Open, and if it's already open you can also do ctrl-o there. There's also duplicate in that menu.

182
Planetdance for windows / Re: Filemanager and editors as tabbed windows
« on: September 20, 2020, 09:17:47 AM »
There is a new strcmd() mode.

17: puts the current databasename into str.

example:
strcmd(17, 0, filename);

This is preferable to using the 'defaultdatabase' variable because it is updated dynamically whenever the user changes a database in a filemanager.

183
Planetdance for windows / Filemanager and editors as tabbed windows
« on: September 19, 2020, 07:41:57 PM »
After some days work most seems to work. I will probably publish tomorrow.
Things to know, that need to go into the help:
- switching with alt-digit to another window does not work when an editor has focus because it uses alt-digit to set a bookmark. Use ctrl-alt digit to switch.
- A right mouseclick in the filemanager now shows a popup with the complete menu in stead of selecting a record. Use ctrl-click to (un)select a record.

[Edit] Gonna have a go at multiple window filemanager again before i publish.

184
Astrobasic / Re: create a temporary file
« on: September 12, 2020, 01:34:56 PM »
Made a memsearch command, help:

memsearch

Syntax: memsearch(int blockno, int stringoffset, char searchstring[$]);
Action: searches blockno at stringoffset for searchstring, returns number in block or -1 if not found.

Example:

Code: [Select]
window(660,660);
int i, n = readopen("jean.db", 0);
real planet[PLANETS];

` this is the structure for memget/read/write, 69 bytes total
real sun;
char name[61];

memget(0, n, 69);     ` make a memblock with each record's sun and name

for (i < n)
  {
  readrecord(0, i);
  getplanets(0, planet);
  sun = planet[0];
  getname(0, name);
  memwrite(0, i, &sun);
  }
i = memsearch(0, 8, "Jean Cremers"); ` search for this name,  'name' comes after real 'sun' so it starts at 8 bytes from the start.
if (i < 0)
  say("", "Not found");
else
  say("", "found");
run;



185
Astrobasic / Re: create a temporary file
« on: September 12, 2020, 12:59:59 PM »
memread/write is more powerfull because you can make structures.
I had a look at your code, you have

Code: [Select]
memget(0, 9999, 60); ` this will make a block with 9999 times 60 bytes
char s[99];
...
memwrite(0, i, &s);

The size of the parts in the block is 60 bytes but you are using a string of 99 bytes. So i hope you know what you are doing. Those functions are meant for things like this:

int a[10], b;
real c[6];
char s[100];

In total this 'structure' is 10 * 4 + 4 + 6 * 8 + 100 = 500 bytes, so you do memget(0, 9999, 500) and now you can do
memread(0, i, &a);
because the structure starts with int a.

Take a good look at this, i'\m not sure you understand these functions correct.
If you do maybe you can do something else in stead of just using one string with  strset(s, "%20s,%d,%d,%d,%d,%.2f,%.2f,0",jdx,aa,aaa,a,graf,p1,p2);

This is also why i can only help to a certain point, it is your work :).

I will make a memsearch()


186
Astrobasic / Re: create a temporary file
« on: September 11, 2020, 09:18:12 PM »
if you prefer the memget/memread etc. functions because they are more powerful, i could make a function to search for data in a memory block fast. But i'm not gonna write your script for you, you have to design it yourself, i can only help with the functions. And please do communication about it here on the forum, i will not help via email, i have too much other work and things to do.

187
Astrobasic / Re: create a temporary file
« on: September 11, 2020, 06:55:55 PM »
no it does nothing, sorry, i always use 'i=i' for debugging.

But at that place a duplicate is found and you can see which. What do you want to do with duplicates?

Code: [Select]
window(555, 555);
real planet[PLANETS];
char s[999];

int i, n = readopen("jean.db", 0);
strlist(0, s, 0);
for (i < n)
  {
  readrecord(0, i);
  getplanets(0, planet);
  strset(s, "%d", planet[0]); ` etc
  int m = strlist(12, s, 0);
  if (m = -1)
    strlist(3, s, 0);` not found, add it
  else
    {
    ` here a duplicate is found, it is number m in the stringlist
    }
  }
run;

188
Astrobasic / Multiple Document Interface
« on: September 10, 2020, 07:22:17 PM »
After lots of storm, the dust is settling down. Ab scripts can have embedded windows.

This seems a succes, i like it a lot. Pretty, user friendly, better monitor size support, options for extra menus.
See ab editor - templates - embedded, it contains

Code: [Select]
window(0, 0);
button(10, height - 30, "Menu", NULL);
command(BUTTON, 0, 10, 0);
command(MENU, 0, 12, 0);

The first line is the new window mode.

This is the updated help for window()

----------------------------------------
There are two special kind of windows possible, the first is when you use window(0, 0);

This makes the script window an 'MDI child', Multiple Document Interface, it embeds itself in the main program just like a horoscope (or graph or moving wheel). The Horoscope menu changes to a menu with the name of the script and it will contain all the menu() items from the script.

You can do command(MENU, 0, 12, 0); preferably on the line just before run; it will do two things:
- it will make a copy of the menu in the script mainmenu into a rightmouseclick popmenu, so the user can rightclick anywhere in the window for the script menu (just like the horoscope window).
- it will add a menu item Output, with subitems Copy to clipboard, Save Bitmap and Print to both menus.

You can also put a special ^button^ on the script like this
button(x, y, "Menu", NULL);
command(BUTTON, buttonnumber, 10, 0);

^setcaption^ will only set the upper caption in the mainwindow, if you want it to change the caption in the tab use command(FUNCTION, 67, x, 0); where x is on/off.

You should use 'width' and 'height' when designing your window and try to fit at least on 1920x1080 as well as 1366x768, in this case you can support the majority of screensizes.

189
Planetdance for android / first alpha
« on: September 10, 2020, 04:54:13 PM »
If you want to participate in testing, register on the forum and leave a reply here.

The interface, swipe from the left side to the right for the menu, and from the right side to the left for the current list with horoscopes.
At start a Startup transit is made.

The menu, what works:

-File New, you can calculate a radix, it is automatically stored in the list with horoscopes on the right.
-File Exit
-Horoscope Data, you can scroll up/down through the list of the current horoscope's data.
-Horoscope Wheel gives some test info

In the right hand is a list with horoscopes, click on one to make it active. Long press on one to delete it. The very first entry, Startup, cannot be deleted. The list is automatically saved / restored on start.

190
You can now do this

Code: [Select]
button(0, 0, "hi", NULL);
command(BUTTON, buttonnumber, 0, 0); ` operate on the previously made button

Previously you had to do:

Code: [Select]
int i = button(0, 0, "hi", NULL);
command(BUTTON, i, 0, 0); ` operate on the previously made button

In stead of
Code: [Select]
menu(4, "Show Radix Lines", go);
menu(4, "Show Radix Planets", go);
menu(4, "Show House Lines", go);
command(MENU, 4, AUTOCHECK, 1); 
command(MENU, 5, AUTOCHECK, 1); 
command(MENU, 6, AUTOCHECK, 1);

It's easier to do this

Code: [Select]
menu(4, "Show Radix Lines", go);
command(MENU, menunumber, AUTOCHECK, 1); 
menu(4, "Show Radix Planets", go);
command(MENU, menunumber, AUTOCHECK, 1); 
menu(4, "Show House Lines", go);
command(MENU, menunumber, AUTOCHECK, 1);

In the last example you can now  delete / add / change the order of the menu()'s without having to change the numbers for command().

This applies to: buttonnumber, scrollnumber, editnumber, updownnumber and menunumber;

191
Planetdance for windows / MOVED: strlist command
« on: September 08, 2020, 03:48:17 PM »

192
Astrobasic / Re: create a temporary file
« on: September 07, 2020, 06:28:53 PM »
Yes indeed, try something like this.

Code: [Select]
window(555, 555);
real planet[PLANETS];
char s[999];

int i, n = readopen("jean.db", 0);
strlist(0, s, 0);
for (i < n)
  {
  readrecord(0, i);
  getplanets(0, planet);
  strset(s, "%d", planet[0]); ` etc
  if (strlist(12, s, 0) = -1)
    strlist(3, s, 0);` not found, add it
  else
    {
    ` found
    i=i;
    }
  }
run;

193
Astrobasic / Re: create a temporary file
« on: September 07, 2020, 05:03:27 PM »
Sorry, i see this only now.
You code is very confusing to me, please describe what you want.
I see a memval() but i don't see how you filled that memory.

If you want to search for a string in memory, this is an example using strlist().
You need to update for this!

Code: [Select]
window(555, 555);
char s[99];

strlist(0, s, 0); ` create the list
int n, i = 0; for (i < 16)
  strlist(3, planetname[i], i); ` add planetnames

strcpy(s, "blabla");
n = strlist(12, s, 0);           ` is it in the list?
if (n > 0)
  say(s, "found");
else
  say(s, "not found");

strcpy(s, "Mars");
n = strlist(12, s, 0);
if (n > 0)
  say(s, "found");
else
  say(s, "not found");
run;

I moved the other message, please keep things in one place, thank you.

194
Ik weet zelf niet direct iets maar ik zal eens navragen.

195
General Astrology Topics / Re: welcome to the boards
« on: September 07, 2020, 04:29:15 PM »
Hoi Ima,

Welkom op het forum. Je kan rustig nederlands gebruiken hoor.

Pages: 1 ... 11 12 [13] 14 15 ... 20