r/rebol • • Jun 27 '15

Handcuffs vs. Run-On Sentences: Draem and Lest

Thumbnail
blog.hostilefork.com
0 Upvotes

r/rebol • • Jun 27 '15

Rebol State of the Union (June 2015)

Thumbnail
blog.hostilefork.com
1 Upvotes

r/rebol • • Jul 30 '14

Learn Rebol (Rebol 2)

Thumbnail
re-bol.com
1 Upvotes

r/rebol • • Oct 01 '14

R2 vs R3 Contexts

Thumbnail
github.com
1 Upvotes

r/rebol • • Oct 21 '13

Capture Screen with GUI (Windows)

1 Upvotes

http://pastebin.com/raw.php?i=3bj0Lpx6

;; ===============================================
;; Script: capture-screen.r
;; downloaded from: www.REBOL.org
;; on: 23-Jul-2013
;; at: 6:12:48.726676 UTC
;; owner: christian [script library member who can
;; update this script]
;; ===============================================
REBOL [
    title:   "Capture Screen"
    name:    'capture-screen
    file:    %capture-screen.r
    author:  ["Gregg Irwin" "Christian Ensel"]
    version: 0.3.0
    date:    5-Apr-2007
    purpose: "(Microsoft/Windows only:) Returns screenshot as an image (or NONE in case of failure)."
    example: [
        if snapshot: capture-screen [
            view center-face layout/tight compose [img: image snapshot (snapshot/size) [quit] effect [colorize coal]]
        ]
    ]
    library: [
        level:          'intermediate
        Platform:       'win
        type:           [function]
        code:           'function
        domain:         [win-api graphics]
        license:        'BSD
        support:        none
        see-also:       none
        tested-under:   [view 1.3.2.3.1 on [WinXP] "CHE"]
    ]
]                   

main: [
	sc: capture-screen ; screen capture
	view win: center-face layout compose [ 
		
		style link text font [
			size: 20 
			color: blue 
			style: [ underline ]
		]
		
		backcolor white across
		link "Save" [ attempt [ 
			save/png request-file/save/file "screen-capture.png" sc 
		] ]
		link "Retake Picture" [
			win/changes: [ minimize ]
			show win
			wait .5
			sc: capture-screen
			fac/image: sc
			win/changes: [ restore ]
			show win
		]
		return
		fac: image sc (sc/size / 2) effect [ blur aspect ] 
	]
]

context [
    user32.dll:   load/library %user32.dll
    gdi32.dll:    load/library %gdi32.dll
   
    &SM_CXSCREEN:             0       
    &SM_CYSCREEN:             1       
    &SRCCOPY:          13369376 #{CC0020}
    &CAPTUREBLT:     1073741824 #{40000000}
    &CLR_INVALID:         65535 #{FFFF}
    &BI_RGB:                  0
    &DIB_RGB_COLORS:          0
    
    BITMAP:             make struct! [Type [integer!] Width [integer!] Height [integer!] WidthBytes [integer!] Planes [short] BitsPixel [short] Bits [char*]] none
    BITMAPINFOHEADER:   make struct! [Size [integer!] Width [integer!] Height [integer!] Planes [short] BitCount [short] Compression [integer!] SizeImage [integer!] XPelsPerMeter [integer!] YPelsPerMeter [integer!] ClrUsed [integer!] ClrImportant [integer!]] none
;   RGBQUAD:            make struct! [Blue [char!] Green [char!] Red [char!] Reserved [char!]] none
;   BITMAPINFO:         make struct! compose/deep/only [Header [struct! (first BITMAPINFOHEADER)] Colors [struct! (first RGBQUAD)]] none                
                                                         
    GetSystemMetrics:       make routine! [Index [integer!] return: [integer!]] user32.dll "GetSystemMetrics"
    GetDesktopWindow:       make routine! [return: [integer!]] user32.dll "GetDesktopWindow"     
    GetDC:                  make routine! [Wnd [integer!] return: [integer!]] user32.dll "GetDC"
    CreateCompatibleDC:     make routine! [DC [integer!] return: [integer!]] gdi32.dll "CreateCompatibleDC"
    CreateCompatibleBitmap: make routine! [DC [integer!] Width [integer!] Height [integer!] return: [integer!]] gdi32.dll "CreateCompatibleBitmap"
    SelectObject:           make routine! [DC [integer!] Object [integer!] return: [integer!]] gdi32.dll "SelectObject"
    BitBlt:                 make routine! [DCDest [integer!] XDest [integer!] YDest [integer!] Width [integer!] Height [integer!] DCSrc [integer!] XSrc [integer!] YSrc [integer!] ROp [integer!] return: [integer!]] gdi32.dll "BitBlt"
    GetPixel:               make routine! [DC [integer!] x [integer!] y [integer!] return: [integer!]] gdi32.dll "GetPixel"
    ReleaseDC:              make routine! [Wnd [integer!] DC [integer!] return: [integer!]] user32.dll "ReleaseDC"
    DeleteDC:               make routine! [DC [integer!] return: [integer!]] gdi32.dll "DeleteDC"
    DeleteObject:           make routine! [Object [integer!] return: [integer!]] gdi32.dll "DeleteObject"
    GetObject:              make routine! [Object [integer!] Count [integer!] Object [struct* [(first BITMAP)]] return: [integer!]] gdi32.dll "GetObjectA"
    GetDIBits:              make routine! [DC [integer!] Bitmap [integer!] StartScan [integer!] ScanLines [integer!] Bits [image!] BI [struct* [(first BITMAPINFO)]] Usage [integer!] return: [integer!]] gdi32.dll "GetDIBits" 
  
    require: func ["Throws NONE if condition isn't met." [throw] argument] [unless not zero? argument [throw none]]
    
    set 'capture-screen func [
        "(Microsoft/Windows 32bit-screens only:) Returns screenshot as an image (or NONE in case of failure)." 
        /local 
            n.ScreenWidth n.ScreenHeight h.DesktopWnd h.DesktopDC h.CaptureDC s
            h.CaptureBitmap h.Bitmap h.BitmapInfo h.BitmapInfoHeader img.Snapshot
    ][  
        img.Snapshot: catch [
            require n.ScreenWidth:   GetSystemMetrics &SM_CXSCREEN                
            require n.ScreenHeight:  GetSystemMetrics &SM_CYSCREEN
            require h.DesktopWnd:    GetDesktopWindow
            require h.DesktopDC:     GetDC h.DesktopWnd
            require h.CaptureDC:     CreateCompatibleDC h.DesktopDC
            require h.CaptureBitmap: CreateCompatibleBitmap h.DesktopDC n.ScreenWidth n.ScreenHeight
            
            require SelectObject h.CaptureDC h.CaptureBitmap
            require BitBlt h.CaptureDC 0 0 n.ScreenWidth n.ScreenHeight h.DesktopDC 0 0 &SRCCOPY or &CAPTUREBLT 
            
            h.Bitmap:           make struct! BITMAP none            
            require GetObject h.CaptureBitmap (length? third h.Bitmap) h.Bitmap 
            
            img.Snapshot:       make image!  as-pair h.Bitmap/Width h.Bitmap/Height
            h.BitmapInfoHeader: make struct! BITMAPINFOHEADER reduce [40 h.Bitmap/Width h.Bitmap/Height h.Bitmap/Planes 32 &BI_RGB 0 0 0 0 0]
                               
            ;-- The docs say GEtDIBits expects a BITMAPINFO, not a -HEADER, but I wasn't able to get this working. Additionally, the scanlines
            ;   copied are reversed vertically, which is why that at EFFECT [FLIP 0x1] is necessary.
            ;
;           h.BitmapInfo:       make struct! BITMAPINFO       compose [(second h.BitmapInfoHeader) (second RGBQuad)]

            require GetDIBits h.CaptureDC h.CaptureBitmap 0 h.Bitmap/Height img.Snapshot h.BitmapInfoHeader &DIB_RGB_COLORS
            
            img.Snapshot/alpha: 0
            to image! layout/tight compose [image img.Snapshot (img.Snapshot/size) effect [flip 0x1]]
        ]
        
        if h.DesktopDC     [ReleaseDC h.DesktopWnd h.DesktopDC]                             
        if h.CaptureDC     [DeleteDC h.CaptureDC]                                                   
        if h.CaptureBitmap [DeleteObject h.CaptureBitmap]   
    
        img.Snapshot
    ]
]

do main

r/rebol • • Jun 11 '14

The Flexible Series as a Core Concept of Rebol [2008]

Thumbnail
blog.hostilefork.com
1 Upvotes

r/rebol • • Dec 03 '14

Path Debate for Rebol and Red (plus "New Path!")

Thumbnail
blog.hostilefork.com
1 Upvotes

r/rebol • • Jul 05 '25

Nice gay guy moved here from Arizona don't know anyone here looking a placer a guy looking for a roomat . I'pay my bills on time don't go a lot but sometimes very clean n n respect t privacy n mind my business

1 Upvotes

Im resptful . N with rules agreement I like to clean Neve mis paying rent I do wear men sexy underwearwhen im chilling all day but if uncomfortable I we chee I'm my room n close the door I can 6 apartment b but a roommat I just need a room n to stay not a whole apartmentn bymesf probly hard to hlfing a gay cool guy needs a roommate .but taken a shot I'm


r/rebol • • Oct 17 '14

RebSM - small/efficient storage manager with SQL-like interface for Rebol 2 & 3

Thumbnail dobeash.com
2 Upvotes

r/rebol • • May 26 '14

Hello World! (Writing a C extension for Rebol 3)

Thumbnail
rebol.esperconsultancy.nl
2 Upvotes

r/rebol • • Nov 10 '14

Encapper for Rebol 3

Thumbnail r3al.org
2 Upvotes

r/rebol • • Jun 23 '14

Rewrite (rewriting of blocks and strings via rules)

Thumbnail codeconscious.com
2 Upvotes

r/rebol • • Jun 05 '14

money! datatype - high-precision arithmetic for financial and scientific applications

Thumbnail rebol.net
3 Upvotes

r/rebol • • May 26 '14

REBOL 3 Concepts: Extensions

Thumbnail rebol.com
3 Upvotes

r/rebol • • Jun 01 '14

cURL Binding (Rebol 3 extension)

Thumbnail
rebol.esperconsultancy.nl
3 Upvotes

r/rebol • • Aug 12 '14

Bindology

Thumbnail rebol.net
3 Upvotes

r/rebol • • Nov 09 '14

New to Rebol, hobbyist programmer, got some questions.

3 Upvotes

Hi i am planning to learn a new language as a hobby. I already done some small projects in vb.net and python. I found rebol and i want to try it. So my first problem is that i cant find a way to make an executable (.exe). Can i make an executable with rebol 2 without installing the interpreter? Found some scripts but they dont work. And the second question. What is the future of rebol. Will i be able to invest time and still have some newer versions to play in the future? I read that the language doesnt have a lead developer anymore.


r/rebol • • Mar 21 '14

The Central Newbie Question about Rebol/Red

Thumbnail
blog.hostilefork.com
3 Upvotes

r/rebol • • Sep 03 '14

Rebol's answer to Regex: parse and Rebol types

Thumbnail
rebol-land.blogspot.co.uk
3 Upvotes

r/rebol • • Aug 28 '14

Deep REBOL: Bindology

Thumbnail blog.revolucent.net
3 Upvotes

r/rebol • • Sep 03 '14

Collection of Rebol 2 tutorial videos

Thumbnail musiclessonz.com
4 Upvotes

r/rebol • • Jul 30 '14

Transitioning from Rebol 2 to Rebol 3

Thumbnail codeconscious.com
4 Upvotes

r/rebol • • Feb 21 '23

The Meta REBOL dialect

Thumbnail language.metaproject.frl
7 Upvotes

r/rebol • • Apr 12 '25

REBOL 1.0 Was Slow

Thumbnail funcall.blogspot.com
4 Upvotes

r/rebol • • Aug 30 '26

Interview with oofoe about REBOL, Forth, Decker, Janet and the VFx Industry

Thumbnail alexalejandre.com
4 Upvotes