Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

Bixby Sayz

 VIPs
  • Content Count

    942
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Bixby Sayz

  1. That explains the empty forums lol. I feels ya on being busy. IRL is super busy for me as well. Look forward to seeing great things when you get a chance to resume development.
  2. Thought I'd duck my head in and say hello. Forums seem depressingly quiet. Haven't been active lately much myself, here or in the other community. Looking forward to dipping my toes back in the water. Getting something working with RS3 NXT looks like it could be fun. So what's the status of things? SCAR Divi 3.41 seems to still be the latest release. Is SCAR Divi 4 still a go? Was really looking forward to the new features. Speaking of which what is the state of the various includes? They still being actively developed???
  3. Not officially. The old versions exist. But there is no link to them. You can get to them by manipulating the download link. Here's the download link for the current version. Notice how the version is built into the link: http://www.scar-divi.com/download.php?file=scar-3.40.00-setup.exe So, if you wanted 3.34 the link to download it would be: http://www.scar-divi.com/download.php?file=scar-3.34.00-setup.exe I've used this trick to download most of the old versions.
  4. What game are you looking to script for. Curious now to see if it can be done. Not like I have time to do it but worth having a look.
  5. Unlikely you'll get many replies. People frown on the buying/selling of scripts. You could take some time and learn to script your game/program/whatever it is. It will be slow going at first but then you will have the ability to write other scripts for it, with no need to continually pay someone each time you need something different.
  6. This gets asked a lot. Simple answer: No. You could in theory implement your script not as a script but as a SCAR plugin in Delphi or Lazarus. Then have a simple script that does little more than call the plugin. It wouldn't stop someone with knowledge/determination from decompiling it but would keep most people out.
  7. There is a search order it looks for includes if you don't include a path at all and just use the name of the include. Can't for the life of me remember the exact order. Think it's includes folder, scar application folder, script folder. Or something like that.
  8. This more than anything will speed things up. There is a limit as to how fast you can search. It does take time to perform a search. Unless you have trouble reading the client directly I would avoid capturing to a bitmap. It is just going to slow things down. I am curious what you are doing that getting the absolute fastest search time is vital. Screen must be changing very fast.
  9. I don't really understand what you are trying to do. Why are you capturing to bitmap in the first place instead of simply searching on the client? And if it is not finding the color then your colors are wrong, or it has to wait until the colors appear? It is often difficult to help when given minimal details to go on.
  10. Something like this??? program New; var Bmp: TSCARBitmap; BmpClient: TSCARBitmapClient; CurClient: TSCARClient; begin CurClient := GetClient(); // Save current client so we can restore it later. Bmp := CurClient.Capture(); // Grab screenshot of current client. BmpClient := TSCARBitmapClient.Create(Bmp); // Create client from bitmap. SetClient(BmpClient); // Set new client as SCAR's target. // Do something here. SetClient(CurClient).Free(); // Set SCAR's target back to orignal client and // free bitmap client. Bmp.Free(); // Free bitmap. CurClient.Free(); // Free client object now that we're done with it. end.
  11. Yeah RS3 is still pretty easy even with ironman restrictions. But I still prefer it to old school. It has all the features I loathed: Spending more time walking that actually doing and those crazy randoms are the two biggest. RS3 is way too easy these days but at least I don't spend all my time watching my character walk, and walk, and walk some more. I remember I used to truly hate doing quests because all you did was spend all your time walking back and forth, back and forth.
  12. How you making out with this? Just logged my RS3 Hardcore Ironman into Old School today to create a Ultimate Ironman. Realizing I really really really do not miss the having to walk every blasted where. Dunno if I'll actually do anything with it. Would for sure if you could be logged into both RS3 and OS at the same time. I can see Herblore among others being a b*tch to do with no banking.
  13. You are trying to assign a TSCARBitmap to a String Result. I would consider creating a custom font. Create a folder in the Fonts folder and in there store a .bmp of each character named for the ascii code (ie upper-case A is 65). Then you can load the font and use SCAR's built-in text functions.
  14. Oort already gave you an example in his code with the repeat statement. repeat <DoSomething> until <SomeConditionIsTrue>; To have it repeat forever repeat Click; until False; // Will never be true
  15. You can tell it to search child windows as well. FindWindowsEx(GetDesktopWindow(), 'Clicker Heroes | Adventure Games', '', True, False, True);
  16. Interesting. I had the Clicker Hero window minimized to the task bar and it still pulled it up.
  17. This worked with SCAR 3.40. Didn't try it with 3.41. program New; var WindowList: THwndArray; begin WindowList := FindWindowsEx(GetDesktopWindow(), 'Clicker Heroes | Adventure Games', '', False, False, True); if (Length(WindowList) > 0) then begin ActivateWindow(WindowList[0]); SetLength(WindowList, 0); end; end.
  18. Glad to hear you go it going. One thing to keep in mind about forms: SCAR is not multi-threaded so when you call a form your script stops at that point and waits until the form exits/closes. May explain some of the behavior you're seeing.There should be a way to prevent SCAR popping up but for the life of me can't remember what it is.
  19. This is perhaps *THE* most useful feature in SCAR for me. Being able to step through a script is insanely useful for debugging a script. Been working with "the other guys" for the last while in order to script for RS3 and man oh man I miss this feature.
  20. Not sure. Depends on the game/webpage you are trying to load. There is a .dll someone developed for running RuneScape in a standalone client. Could be possible to adapt to load any java based game.
  21. Interesting! (My goto phrase when I am stumped) I was just about to respond "check the modal result" and then I read the rest of your post. Have to get back to you on this one. Edit: There are ton of ways to do this. Here is a "quick and dirty": note how I set the properties of the buttons to mrOk and mrCancel respectively. var Form1: TForm; Button1: TButton; Button2: TButton; procedure Form1_Init; begin Form1 := CreateForm; Button1 := TButton.Create(Form1); Button2 := TButton.Create(Form1); with Form1 do begin Left := 376; Top := 179; Caption := 'Test Modal'; ClientHeight := 50; ClientWidth := 190; Color := clWindow; Font.Charset := DEFAULT_CHARSET; Font.Color := clWindowText; Font.Height := -11; Font.Name := 'Tahoma'; Font.Style := []; OldCreateOrder := False; PixelsPerInch := 96; end; with Button1 do begin Parent := Form1; Left := 10; Top := 11; Width := 75; Height := 25; Caption := 'Button1'; ModalResult := mrOk; TabOrder := 0; end; with Button2 do begin Parent := Form1; Left := 96; Top := 11; Width := 75; Height := 25; Caption := 'Button2'; ModalResult := mrCancel; TabOrder := 1; end; end; procedure Form1_SafeInit; var v: TVariantArray; begin SetLength(v, 0); ThreadSafeCall('Form1_Init', v); end; function Form1_ShowModal: Boolean; begin Result := Form1.ShowModal = mrOk; end; function Form1_SafeShowModal: Boolean; var v: TVariantArray; begin SetLength(v, 0); Result := ThreadSafeCall('Form1_ShowModal', v); end; var FormOk: Boolean; begin Form1_SafeInit; FormOk := Form1_SafeShowModal; FreeForm(Form1); if not FormOk then begin Writeln('Form returned mrCancel'); TerminateScript(); end; Writeln('Form returned mrOk'); Writeln('>> Continue on with script'); end.
  22. I thought I answered #3 in my example. You'll see it reads the value of an edit and determines if it is a string or a number. Perhaps I am misunderstanding the question. As for #1. I guess I confused the issue by showing the OnEnter and OnExit events. 99.99% of the time you don't need these. There are some special cases where it is useful to do something when a control changes and there is no OnChange event for that particular control. In that case you could hook into the OnExit event as a cheap workaround. But for now pretend they don't exist. If you have a need for them you'll know it. As for the OnClose, not sure what you are asking. If you want to do something after the form is closed just put your code out in the main script after the call to the form. You can in the OnClose event prevent the form from closing. A Special case, but sometimes you want to prevent the user from closing the form until they have enter valid values in everything. Again not something you will use often. Tip: If the form is modal (and I think the example is?) you can force the form to close by setting the result yourself in code (or at least you can in Delphi, I believe SCAR works the same way?). Form1.ModalResult := mrOK Someone else asked about using records. Personal preference. 6 of one, half dozen of another. Try looking at the generated code in the form designer while toggling the records option. Accomplishes the same thing. Some people prefer it. Some people think it looks "odd". One nice thing about using the record is each control is automatically "owned" by the form. Everything has an "owner" that is responsible for freeing its memory after use. If you don't use records remember to manually set each control's owner to the form to keep things tidy memory wise. I am now officially rambling so I will shut up now.
  23. Some people use OnExit to validate the field. (As users exits control check value. If invalid change it back to something valid). Or OnChange can be used. I just threw those all in there so you could see the timing of when things happen. TTabControl is a bit odd. They aren't actually separate tabs like you would expect. Look into using TPageControl for that. And see this example for parsing data: type TForm1 = record Form1: TForm; PageControl1: TPageControl; TabSheet1: TTabSheet; Label1: TLabel; Label3: TLabel; Edit1: TEdit; TabSheet2: TTabSheet; Label2: TLabel; end; var Form1: TForm1; procedure EditChanged(Sender: TObject); var Num: Integer; begin with Form1.Edit1 do begin if (Length(Text) = 0) then Form1.Label3.Caption := 'Edit is empty.' else begin Num := StrToIntDef(Text, -999999); if (Num = -999999) then Form1.Label3.Caption := 'Edit contains string. Value: "' + Text + '"' else Form1.Label3.Caption := 'Edit contains number. Value: ' + IntToStr(Num); end; end; end; procedure Form1_Init; begin with Form1 do begin Form1 := CreateForm; PageControl1 := TPageControl.Create(Form1); TabSheet1 := TTabSheet.Create(PageControl1); Label1 := TLabel.Create(TabSheet1); Label3 := TLabel.Create(TabSheet1); Edit1 := TEdit.Create(TabSheet1); TabSheet2 := TTabSheet.Create(PageControl1); Label2 := TLabel.Create(TabSheet2); with Form1 do begin Left := 651; Top := 241; Caption := 'Form1'; ClientHeight := 202; ClientWidth := 304; Color := clWindow; Font.Charset := DEFAULT_CHARSET; Font.Color := clWindowText; Font.Height := -11; Font.Name := 'Tahoma'; Font.Style := []; OldCreateOrder := False; PixelsPerInch := 96; end; with PageControl1 do begin Parent := Form1; Left := 0; Top := 0; Width := 304; Height := 202; ActivePage := TabSheet1; Align := alClient; TabOrder := 0; end; with TabSheet1 do begin Parent := PageControl1; PageControl := PageControl1; Caption := 'TabSheet1'; end; with Label1 do begin Parent := TabSheet1; Left := 12; Top := 8; Width := 57; Height := 13; Caption := 'This is tab 1'; end; with Label3 do begin Parent := TabSheet1; Left := 12; Top := 56; Width := 163; Height := 13; Caption := 'Edit contains text. Value = "Edit1"'; end; with Edit1 do begin Parent := TabSheet1; Left := 12; Top := 28; Width := 121; Height := 21; TabOrder := 0; Text := 'Edit1'; OnChange := @EditChanged; end; with TabSheet2 do begin Parent := PageControl1; PageControl := PageControl1; Caption := 'TabSheet2'; end; with Label2 do begin Parent := TabSheet2; Left := 19; Top := 24; Width := 57; Height := 13; Caption := 'This is tab 2'; end; end; end; procedure Form1_SafeInit; var v: TVariantArray; begin SetLength(v, 0); ThreadSafeCall('Form1_Init', v); end; function Form1_ShowModal: Boolean; begin Result := Form1.Form1.ShowModal = mrOk; end; function Form1_SafeShowModal: Boolean; var v: TVariantArray; begin SetLength(v, 0); Result := ThreadSafeCall('Form1_ShowModal', v); end; begin Form1_SafeInit; if Form1_SafeShowModal then WriteLn('Form returned modalresult ok'); FreeForm(Form1.Form1); end.
  24. I hate to see anyone stuck. Here is a basic example generated using SCAR's built-in form editor. I added some events to demonstrate and read the properties after the form closes. (You could read the properties while the form is still open in the various events). Note out of laziness I pointed all the controls to the same event but you could write a separate proc for each control. program New; // Generated using SCAR's built-in form designer and adding events after the // fact. type TForm1 = record Form1: TForm; Label1: TLabel; Button1: TButton; Edit1: TEdit; CheckBox1: TCheckBox; RadioButton1: TRadioButton; ComboBox1: TComboBox; Memo1: TMemo; end; var Form1: TForm1; procedure OnClickEvent(Sender: TObject); begin Form1.Memo1.Lines.Add(Sender.ClassName + ': <OnClick> Event.'); end; procedure OnEnterEvent(Sender: TObject); begin Form1.Memo1.Lines.Add(Sender.ClassName + ': <OnEnter> Event.'); end; procedure OnExitEvent(Sender: TObject); begin Form1.Memo1.Lines.Add(Sender.ClassName + ': <OnExit> Event.'); end; procedure OnChangeEvent(Sender: TObject); begin Form1.Memo1.Lines.Add(Sender.ClassName + ': <OnChange> Event.'); end; procedure OnDropDownEvent(Sender: TObject); begin Form1.Memo1.Lines.Add(Sender.ClassName + ': <OnDropDown> Event.'); end; procedure OnCloseUpEvent(Sender: TObject); begin Form1.Memo1.Lines.Add(Sender.ClassName + ': <OnCloseUp> Event.'); end; procedure OnSelectEvent(Sender: TObject); begin Form1.Memo1.Lines.Add(Sender.ClassName + ': <OnSelect> Event.'); end; procedure Form1_Init; begin with Form1 do begin Form1 := CreateForm; Label1 := TLabel.Create(Form1); Button1 := TButton.Create(Form1); Edit1 := TEdit.Create(Form1); CheckBox1 := TCheckBox.Create(Form1); RadioButton1 := TRadioButton.Create(Form1); ComboBox1 := TComboBox.Create(Form1); Memo1 := TMemo.Create(Form1); with Form1 do begin Left := 435; Top := 179; Caption := 'Form1'; ClientHeight := 202; ClientWidth := 304; Color := clWindow; Font.Charset := DEFAULT_CHARSET; Font.Color := clWindowText; Font.Height := -11; Font.Name := 'Tahoma'; Font.Style := []; OldCreateOrder := False; PixelsPerInch := 96; // Any properties set on the form will "flow down" to child components. ShowHint := True; end; with Label1 do begin Parent := Form1; Left := 12; Top := 44; Width := 25; Height := 13; Caption := '&Label'; FocusControl := Edit1; Hint := 'This is a TLabel. Try pressing <Alt-L> to see shortcut key and FocusControl in action.'; OnClick := @OnClickEvent; end; with Button1 do begin Parent := Form1; Left := 6; Top := 9; Width := 75; Height := 25; Caption := 'Button'; TabOrder := 0; Hint := 'This is a TButton'; OnClick := @OnClickEvent; OnEnter := @OnEnterEvent; OnExit := @OnExitEvent; end; with Edit1 do begin Parent := Form1; Left := 48; Top := 40; Width := 72; Height := 21; TabOrder := 1; Text := 'Editbox'; Hint := 'This is a TEdit. Try pressing <Alt-L> to see the TLabel''s shortcut key in action.'; OnClick := @OnClickEvent; OnEnter := @OnEnterEvent; OnExit := @OnExitEvent; OnChange := @OnChangeEvent; end; with CheckBox1 do begin Parent := Form1; Left := 169; Top := 13; Width := 97; Height := 17; Caption := '&CheckBox'; TabOrder := 2; Hint := 'This is a TCheckBox. Try pressing <Alt-C> to see shortcut key in action.'; OnClick := @OnClickEvent; OnEnter := @OnEnterEvent; OnExit := @OnExitEvent; end; with RadioButton1 do begin Parent := Form1; Left := 169; Top := 35; Width := 113; Height := 17; Caption := 'RadioButton'; TabOrder := 3; Hint := 'This is a TRadioButton.'; OnClick := @OnClickEvent; OnEnter := @OnEnterEvent; OnExit := @OnExitEvent; end; with ComboBox1 do begin Parent := Form1; Left := 169; Top := 56; Width := 116; Height := 21; Style := csDropDownList; TabOrder := 4; Text := 'ComboBox'; Items.Add('ComboBox'); Items.Add('Line 2'); Items.Add('Line 3'); // This must come *AFTER* defining items or it doesn't work. ItemIndex := 0; Hint := 'This is a TComboBox.'; OnClick := @OnClickEvent; OnEnter := @OnEnterEvent; OnExit := @OnExitEvent; OnChange := @OnChangeEvent; OnDropDown := @OnDropDownEvent; OnCloseUp := @OnCloseUpEvent; OnSelect := @OnSelectEvent; end; with Memo1 do begin Parent := Form1; Left := 6; Top := 88; Width := 276; Height := 89; Lines.Add('Memo'); ReadOnly := True; ScrollBars := ssVertical; TabOrder := 5; Hint := 'This is a TMemo. Notice how it is read only.'; OnClick := @OnClickEvent; OnEnter := @OnEnterEvent; OnExit := @OnExitEvent; // OnChange := @OnChangeEvent; end; end; end; procedure Form1_SafeInit; var v: TVariantArray; begin SetLength(v, 0); ThreadSafeCall('Form1_Init', v); end; function Form1_ShowModal: Boolean; begin Result := Form1.Form1.ShowModal = mrOk; end; function Form1_SafeShowModal: Boolean; var v: TVariantArray; begin SetLength(v, 0); Result := ThreadSafeCall('Form1_ShowModal', v); end; begin Form1_SafeInit; if Form1_SafeShowModal then WriteLn('Form returned modalresult ok'); Writeln('Checkbox: ' + BoolToStr(Form1.CheckBox1.Checked)); Writeln('RadioButton: ' + BoolToStr(Form1.RadioButton1.Checked)); Writeln('Combobox: "' + Form1.ComboBox1.Text + '"'); FreeForm(Form1.Form1); end. I'm baaaaaaack. No not really. Just popping in.
  25. The simplest solution would be to have the script beep then pause. Which for the life of me I cannot remember how to do.
×
×
  • Create New...